Skip to Content
author's profile photo
Former Member

parameter mapping

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 17, 2004 at 08:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 17, 2004 at 09:19 AM

    Hi Stefan,

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

    Add comment
    10|10000 characters needed characters exceeded

    • 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.