cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Selected Link to Action Context Values.

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Valery,

I tried using getTreeSelection but that selects only the row that has been explicitly. Clicking on a link present in a row does not select the row in a tree table. So could you please tell me a way i can do that??

Regards,

Harish

Former Member
0 Kudos

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