I’m trying to find some information on the above property of an update-able content provider.
Ideally I’d like to bind it to my custom action to delete the corresponding row in our DB, but it doesn’t call my action method at all.
Hi Eric
I created a SelectableListTableContentProvider from a web service’s results array. I created an async table with it’s value property bound to the provider.
It’s basically a simple CRUD table with a Remove Row Button in each row & when I was looking at the content provider’s properties, there is a property called Before Row Deleted Action which has a tooltip that states “Bind to custom Action invoked before the row gets deleted. The Action can use any data from the row being deleted”
I created a custom action I was going to use to call another web service which would delete the row from the external DB through the IS when the Remove Row button was clicked, but the custom action is never called even although the row is deleted.
I was just after some documentation on how this property should be used.
I have actually implemented a listener which deals with this scenario perfectly well… but my interest has been piqued!
Ok I attach a simple example - I’ve bound a custom action method to the content providers Before Row Deleted Action property which logs a message, only when the row is deleted no message is logged i.e the action method is not called.
In your sample there was no command button controls anywhere so it looked like all the row remove activity was only happening on the client side? If so then maybe that is why you didn’t get anything logged.
The “Before Row Deleted” callback would be invoked while it is updating the server-side model, so there would have to be a round trip to the server for it to postback the row changes and apply the changes to the sever side model.
After I placed a simple Async Command Button in your portlet and click it after removing a row, the removeRowAction() callback got invoked and a message was logged.