cancel
Showing results for 
Search instead for 
Did you mean: 

LinkToAction in Table

Murali_Shanmu
Active Contributor
0 Kudos

Hi,

I am creating a Table similar to Who's Who in ESS. The first column of my table is Employee Code which is a LinkToAction. So when my user clicks on the Employee code, application should take the user to anther view which shows employee details. There is no selection for the table. How do I capture which employee code has been selected by the user in my first column.

There is a method associated to the LinkToAction. Here I can pass the Employee Code and fire the Plug. But the problem is how do I get the employee code selected by the user.

Sugestions are welcome.

Regards,

Murali

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Muralidaran.

You can get the element (employee) from the event which is passed to the

action handler method (linktoaction).

just call wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

You also could add this as parameter to the parameter list of the action method.

context_element type ref to if_wd_context_element.

The system should pass the element in which the link was clicked via this parameter then.

Hope this helps.

Cheers,

Sascha

Murali_Shanmu
Active Contributor
0 Kudos

Thanks Sascha. Shall check it out.

Murali_Shanmu
Active Contributor
0 Kudos

Thanks Pal.. Issue solved.

Former Member
0 Kudos

Hi.

The parameter works for me.

I think you have to name it context_element.

But did you try wdevent->get_context_element( 'CONTEXT_ELEMENT' )?


data: lr_element type ref to if_wd_context_element.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

Cheers,

Sascha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

after u hav binded the node to the table, u shud use the lead selection property to get the value of the row u hav selected.

int i = wdContext.nodeABC.getLeadSelection();

String name = wdContext.nodeABC.getnodeABCElementAt(i).getElement();

try using this.

Regards,

Prasy