Skip to Content
0
Nov 24, 2011 at 10:03 AM

How to prevent action (lead selection change) with popup (confirmation)?

33 Views

Hello all,

I have an application where I want the user to confirm when he selects a new line in a table. When the user selects a new line in the table an other used component reloads its data based on the new line selected. If the user has not pressed the save button before selecting a new line, any changes in the used component will be lost.

Currently I use onLeadSelect action on the table to call the load_data method(id=xxx) on the used component in order to display data relevant for id=xxx based the new line.

I can open a popup to confirm from the onLeadSelect-action or the WDDoBeforeAction, but the action still happens; it doesn't wait for the user to respond. And then any changes are lost... 😔

I may have to store the parameters sent to the onLeadSelect method in context and continue when the button action from the pop-up returns via subscribed method, but I think this is an unelegant way of doing this.

There must be a better way...? Any ideas?

Regards,

Christian Frier