cancel
Showing results for 
Search instead for 
Did you mean: 

How to block lead selection change in a tree ?

Former Member
0 Kudos

Hi Guys,

<u>Scenario</u>

I have MasterTree - DetailEditor pair. <i>MasterTree</i> is used to visit some tree-structured data and <i>DetailEditor</i> is used to edit currently selected tree node.

<u>Requirement</u>

If currently selected node data is updated through <i>DetailEditor</i> and needs to be saved, than on a subsequent tree selection change the user should be warned about unsaved data.

<u>Implementation</u>

In <b>onAction</b> event handler of <i>MasterTree</i> I check whether last selected node data is updated and needs to be saved and if this is the case rollback <i>treeSelection</i> to that node. On the time <b>onAction</b> event handler is called the tree selection is changed from the node that needs save to the newly selected node. In order to rollback <i>treeSelection</i> I need to introduce variable referencing last selected tree node.

<u>Question</u>

Is there any other technique to implement above scenario without using additional variable and manually rollback <i>treeSelection</i> ? For example, to plug in WDP framework on validation step just before lead selection is changed.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Alex,

Sadly, nothing is here besides manual rollback

However, in NW04<b>s</b> "plain" table (i.e. without MasterColumn) you may achive this via setting selection change behavior to manual.

VS

Former Member
0 Kudos

Alex,

Here is a link to the phase model of WD:

http://help.sap.com/saphelp_nw04/helpdata/en/b8/cd96edb9c8794aa362e6e8b4236a1f/frameset.htm

There aren't any hooks provided prior to the event handlers being called. As far as I can tell, the way you are handling it is the only way that will work.

-Cindy