cancel
Showing results for 
Search instead for 
Did you mean: 

get text from link to action present in table

Former Member
0 Kudos

Hi,

I have created a table .The first column(link to action) takes control number from the database and displays in the form of link to action.when any of the link is clicked, I need the control number value that is clicked.So that it can be set to a context variable that is to be used in the next view.

plz give me the code to get the text that is clicked.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Let "Rows" be the data source node of the table, and let "LinkText" be the attribute that stores the link text.

Define an event parameter mapping:


void wdDoModifyView(...)
{
  if (firstTime)
  {
    IWDLinkToAction link = (IWDLinkToAction) view.getElement("<ID-of-link>");
    link.mappingOfOnAction.addSourceMapping
    (
       "nodeElement",
       "row"
    );
  }
}

Add parameter "row" of type IRowsElement to the action that is assigned to the link.

Inside action handler, you can now get the text of the clicked link by calling row.getLinkText().

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

hai Jesmi,

int i=wdContext.node<ur node element>().getLeadSelection();

String s=wdContext.node<ur node element>().get<ur value attribute in node element>ElementAt(i);

hope this helps u

regards

sunil

Former Member
0 Kudos

Hi

String text=wdContext.current<TableNode>Element().get<Param>();

Kind Regards

Mukesh