1 2 Previous Next 21 Replies Latest reply on Dec 13, 2012 2:41 PM by 925715

    Not getting selected row values on commnadLink click???

      Hi Everyone,

      i have created one ADF table with 10 columns. Out of which first column(Empno) i modified to commandLink and provided Action: Link1().

      The code in the Link1() method is as follows:

      public String Link1() {
      // Add event code here...

      DCBindingContainer bindings =
      DCIteratorBinding dcItteratorBindings =
      ViewObject voTableData = dcItteratorBindings.getViewObject();
      Row rowSelected = voTableData.getCurrentRow();

      String Empname =rowSelected.getAttribute("EmpName").toString();
      String Empno =rowSelected.getAttribute("EmpNo").toString();
      String Comm =rowSelected.getAttribute("Comm").toString();
      String Manager =rowSelected.getAttribute("Manager").toString();

      System.out.println("Emp Name selected is:"+Empname);
      System.out.println("Emp No selected is:"+Empno);
      System.out.println("Comm selected is:"+Comm);
      System.out.println("Manager selected is:"+Manager);

      Now the issue is for suppose table has 20 rows if i click on the 15th row(click on the EmpNo of 15th row) then the row values returned in the Link1() method belongs to First row.
      if i click on any row but the values returned in the Link1() method are belongs to first row only.

      How to get the values of current row clicked???
      Any suggestions will be really useful.

        1 2 Previous Next