Providers Before Row Deleted Action

Hi

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.

Any ideas welcome

Thanks

Are you able to provide a simple test project that demonstrates the problem and shows what you have attempted to do?

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!

Thanks

Your approach seems reasonable, but it will be difficult to provide any guidance without seeing a sample project that demonstrates the problem.

It could be a bug or user error, but arriving at any conclusion without seeing specifically what you have done is it bit of a guessing game.

Hi Eric

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.

Thanks
ProviderTest_20170105.zip (31.8 KB)

I took a quick look at your sample.

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.

Thanks Eric - any idea where there is documentation on these providers

All the official information is included in the product documentation.

If there are areas that you or a customer would like to be improved in documentation or functionality, then you can make a proposal in brainstorm @ https://empower.softwareag.com/Products/FeatureRequestsInBrainstorm/default.asp for consideration in a future release.