cancel
Showing results for 
Search instead for 
Did you mean: 

parameter mapping

Former Member
0 Kudos

Hi Community,

I got a table with one button for each row. Each button forces the same onActionMethod(). The button ID's are not determinable. How can I seperate the single buttons from each other? I can imagine to map a parameter of the button-action-method to another unique entry in the table but I do not really know how to implement this. Regards, Robert.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Robert,

you don't need parameter mapping. Since the line is selected when you hit the button, it's enough to get the current node element's index (or whatever you need from the node, maybe an ID) from the table's dataSource by

int i = wdContext.current<YourNode>Element().index();
wdComponentAPI.getMessageManager().reportSuccess("Selected element index: " + i);

Regards

Stefan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Stefan,

this works fine. Thank's a lot. Regards.

former_member374
Active Contributor
0 Kudos

Hi Robert,

You are thanking a poster for his answer.

Please next time also give him points.

See: /people/mark.finnern/blog/2004/08/10/spread-the-love

This time I did it for you.

Remember: When you ask a question you also assume the responsibility to assign points.

Please check your other questions and if the answers were good.

Spread the love and give some points.

Thanks in advance, Mark.