0 Replies Latest reply on Jul 17, 2007 2:32 PM by Dante Vazquez

    Problem with a4j:commandLink wrapped in a t:dataTable

    Dante Vazquez Newbie

      Hi again all.

      Im having trouble with a commandLink wrapped in a tomahawk dataTable. I am based in the googlehouse example of Peter Wang. When the user clicks on that commandLink,the method binded in the action attribute should be triggered. However,it is not working,it doesn´t even enter the method (I've tried with a System.out). The code is as follows:

      
      <a4j:region selfRendered="true">
       <a4j:status startText=" Performing Request" stopText=" Request Done"/>
       <h:form>
       <a4j:outputPanel id="projs">
       <t:saveState value="#{revprojBean}" ></t:saveState>
       <t:dataTable value="#{revprojBean.projects}" var="project"
       id="projectsData" cellpadding="0" cellspacing="0" width="100%" border="0"
       preserveDataModel="false" rows="6" rowClasses="odd,odd,odd,even,even,even"
       rowIndexVar="rowIndex" sortColumn ="#{revprojBean.sort}"
       sortAscending ="#{revprojBean.ascending}">
       <t:column>
       <t:graphicImage value="/icons/alert.gif" alt="Invalid Row" rendered="#{!project.valid}" id="invalidicon"></t:graphicImage>
       <t:graphicImage value="/icons/checkmark.gif" alt="Current Selection" rendered="#{rowIndex==revprojBean.selectedRowIndex}" id="selectedicon"></t:graphicImage>
       </t:column>
       <t:column>
       <f:facet name="header" >
       <h:outputText value="Select One" id="h1"/>
       </f:facet>
       <a4j:commandLink action="#{revprojBean.view}" reRender="projs,detailtab" >
       <t:graphicImage value="/icons/edit_icon.gif" alt="Click here to edit the record" />
       <f:param name="selectedRowIndex" value="#{rowIndex}"/>
       </a4j:commandLink>
      
      


      the method binded is view, but it's not working. Here is part of the method:

      public String view()
       {
       System.out.println("entro a view");
       setSelectedRowIndex(Integer.parseInt((String)JsfHelper.getParameter("selectedRowIndex")));
       setProject((Tcproject)(projects.get(this.getSelectedRowIndex())));
       setShowDetailView(true);
       return "OK";
       }
      



      Hope you can help me . Thanks