Skip to Content
author's profile photo Former Member
Former Member

Getting Selected Link to Action Context Values.

Hi ,

I have a master column which is of type Link To action and my requirement is that when i click on a particular row link, i need to fetch the corrsponding values from the context. Now i tried context.currentNodeElement.getxxx but this doesnt work may be because my Node has a recursive node within it. Could you please suggest a way i can do this.

Even passing the row id as a parameter to the method which handles this would be useful.

Thanks,

Harish

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2005 at 07:47 PM

    Harish,

    What WD version are you using?

    If it is SP14 then you can map "nodeElement" of IWDLinkToAction onAction event and receive it as parameter.

    If it is lower version you may try getTreeSelection on recursive node.

    See /people/valery.silaev/blog/2005/06/20/master-of-columns-part-ii

    Valery Silaev

    EPAM Systems

    http://www.NetWeaverTeam.com

    Message was edited by: Valery Silaev

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Which SP are you using? As Valery said, in newer versions, the node element corresponding to the selected UI element is implicitely passed to the event handler.

      To get access to it as an event handler parameter, you have to define a parameter mapping. Try something like

      wdDoModifyView():

      if (firstTime)
      {
        IWDLinkToAction link = (IWDLinkToAction) view.getElement("<LinkToAction ID>");
        link.mappingOfOnAction().addSourceMapping
        (
          "nodeElement", // name of implicit event parameter
          "selectedElement", // name of action parameter
        );
      }
      

      Define an action parameter "selectedElement" of type IWDNodeElement (or use the generated node element type). Then the action handler method parameter "selectedElement" will contain the node element for the selected link.

      Armin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.