Skip to Content
0
Former Member
Jul 20, 2009 at 10:11 AM

How to delete dynamically created nodes?

29 Views

Hello Colleagues,

In our screen we have a push button which adds one node to the context when used. The node is having a few fields which are shown in the UI.

So as you keep on pressing the button, additional rows will be appended on the screen.

Now, I have added another button on each of these rows. On clicking of which it should remove the row (the node). So each time you press the button 'Add element', additional rows will be appended, and each row will have a button 'Remove Element'.

But, the problem I am facing is in the implementation of 'Remove Element'.

The button 'Remove Element' is mapped to an action. But since there are as many 'Remove Element' buttons as there are rows, how do I identify which node is to be deleted ?

I have tried with get lead selection etc. but it didnt work.

Is there any way we can find out which UI element has trigerred the deletion, in the code of 'onactionSOMETHING' ?

Thanks

Gagan