cancel
Showing results for 
Search instead for 
Did you mean: 

WDA Consume UI events (table selection)

0 Kudos

Hello,

I have the following situation:

I have a table (populated by supp-method A) and some other UI elements (populated by supp-method B showing additional information / details to the table entry).

Supp-method B is executed anytime the lead selection of the table changes.

If some of these values in the underlying UI elements are changed, I'd like to prompt the user with a "Save"-dialog if he changes the lead selection of the table. Unlikely the PopUp dialog runs asynchronously and the change to the lead selection occurs in the background while the PopUp dialog is being displayed. I can avoid the execution of the supp-method B (so the data isn't lost), but the lead selection is still on the wrong table line.

Is there a way to "consume" or redirect the events provided by UI elements (similar to the IF_WD_COMPONENT->CANCEL_NAVIGATION( ) method) ?

Best Regards

Waldemar

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Waldemar

To avoid changing of lead-selection in background that you mentioned

you can try to set 'selectionChangeBehaviour' property to MANUAL. The following passage is from help.

This selection change behaviour determines that the table does not change its data source's lead selection upon user interaction, but only fires the onLeadSelect event. It is the event handler's responsibility to actually change the lead selection, or else the table will not be functional in a master-detail scenario. This behaviour allows application code to first evaluate if a lead selection change is to be allowed or not.

BR

Sergei

0 Kudos

Hello Sergei,

Thank you very much for your reply. It isn't as powerful as an "event consume" would be, because it needs some lines of extra coding ( lazy ... I know ;o) ), but it solved my problem very well.

Best Regards

Waldemar

Answers (0)