cancel
Showing results for 
Search instead for 
Did you mean: 

LinkToAction with id from table row

Former Member
0 Kudos

Hi,

Ive been searching for this for a while now but found no matching example: I have a table which displays the return values of an EJB model call:

method -> response -> return which has 0 .. n cardinality.

Now I want to have a linktoaction which triggers a wdFirePlug event and supplies the ID of the given element. How can I map the ID to the action parameter?

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Say you have the following context structure


Rows (node)
+ id (string)

If you have a table column with LinkToAction as cell editor you can map the event parameter "nodeElement" to some action parameter "row" of type IRowsElement. Programmatically this is done like this (better do it inside the View Designer):


wdDoModifyView()
{
  if (firstTime)
  {
    IWDLinkToAction link = (IWDLinkToAction) view.getElement("link_id");
    link.mappingOfOnAction().addSourceMapping("nodeElement", "row");
  }
}

In the action handler, you can now get the ID like this:


void onActionLinkClicked(..., IRowsElement row)
{
  String id = row.getId();
}

Armin

Answers (0)