Skip to Content

Link to Action in table cell in WDA

Dear Experts,

I am working on web dynpro application where i created a normal table .

I am displaying selected row details in one container.. For this i write the code in OnLeadSelection event . But i want to display

the details when clicks on link in table cell instead of OnLeadSelection.

Any ideas ll be appreciated..

Thanks in Advance,

Kind Regards


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 11, 2011 at 04:27 AM

    Hello Kiran,

    It is possible, we need trigger an event atleast like leadselection, or insteading of lead selection remove the lead selection and provide the check box for all the rows, on select of the check box display the values or place an input field and make it as read only then ask user to press enter on that particular field. But dont forget to write your implementation on OnEnter action of inputfield.

    ya, as he said, even it is possible by placing linktoAction also. no issues. I messed up with the question you asked and provided answers. now i have corrected.

    hope it helps. Revert for any clarification.


    Nizamudeen SM

    Edited by: Nizamudeen SM on Jan 11, 2011 7:09 AM

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Kiran,

      1. How many rows are there in the table?

      2. What is the value for the property Compatability Model in the table? It should be auto. (It is in Webdynpro JAVA)

      3. wdContext.currentTableNodeElement().getName(); it will give you the current value on whichever row you have clicked.

      And for check box

      Place a new column and name it as Select. on that place CheckBox Ui. you need bind a boolean attribute for the check and it should inside the table node. on click action, write the code to check which element is selected by checking this attribute is true or not. Using that get the index of that element and process accordingly.

      Try the following for WD ABAP.




      Nizamudeen SM

  • Jan 11, 2011 at 05:35 AM


    If I understood you correct, you want to display certain rows on click of link to action instead of OnLeadSelection. I think this is possible and whatever code you have written, you cam write the same in onAction of Link. And dont write anything on onLeadSeclection.

    Once you click on your link to action, by default onLeadSelection will be triggered and if there is no code, next action will be called which is your link to action.

    We have tried the same approach and it worked for us.


    Abhinav Sharma

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 11, 2011 at 07:47 AM

    Hi kiran,

    romove the action asiigned to onLeadSelection and create LinkToAction UI element in Table cell editor and assign newly created action to LinkToAction UI element.

    in that action first get the leadselection fo table by using getLeadselection() method.

    get the values from that row based on lead selection and set to the container fields.

    revert back if you any quaries.

    Thanks & Regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Kiran Kumar Valluru

      Hi Kiran,

      it is very simple.

      1. By defult first row will be select, if you don't want that use the following code in wdDoInint() method.


      2. Place the LinkToAction UI element in Table cell editor and create the action for that.

      3. In Action write the following code.

      if for example in table LInk, EmpId, name and Empstatus columns are there.

      IPrivateAPPlinktestView.ITableNode node = wdContext.nodeTable();

      IPrivateAPPlinktestView.ITableElement ele;

      if(node.getLeadSelection() != -1)


      ele = node.getTableElementAt(node.getLeadSelection());





      revert back if you have any quaies.

      Thanks & Regards,


  • avatar image
    Former Member
    Jan 12, 2011 at 05:01 AM

    Hi Kiran,

    You can achive this by means of Parameter mapping for the link to action UI you are using, below are the steps

    1. For the onAction method of the Link to Action UI add an input parameter selectedElement of type IWDNodeElement.

    2. Add the below mentioned code in the wdDoModify() method, assuming "la_Link" is the Id of the Link to Action UI added in the table cell

         IWDLinkToAction link = (IWDLinkToAction) view.getElement("la_Link");              
         link .mappingOfOnAction().addSourceMapping("nodeElement","selectedElement");

    3. In the onAction method of the Link to Action UI use the below line of code to get the selected row, using which you can get the corresponding values

    IPrivate<VeiwName>.I<TableNodeElement> element = (IPrivate<VeiwName>.I<TableNodeElement>) selectedElement;

    Hope this will help.


    Vishweshwara P.K.M

    Hey sorry, I did not see the subject line properly, this answer was for web Dynpro JAVA

    Edited by: Vishweshwara P.K.M on Jan 12, 2011 6:06 AM

    Add comment
    10|10000 characters needed characters exceeded