4 Replies Latest reply on Apr 10, 2008 4:36 PM by ssilvert

    Index Access

    jgilbert

      I'm having trouble accessing indexed rows in a data table.

      Here are the code fragments:

      client.clickCommandLink("0:editLink");
      


      <a4j:htmlCommandLink id="editLink"
       action="#{editor.editEntity}">
       <f:param name="id" value="#{row.id}"/>
      </a4j:htmlCommandLink>
      


      If there is only one row in the table it sort of works. But when there are many rows I get the following error:

      org.jboss.jsfunit.facade.DuplicateClientIDException: 0:editLink matches more than one JSF component ID. Use a more specific ID suffix. Suffix matches: searchForm:searchTable:0:editLink, searchForm:searchTable:0:editLink
      at org.jboss.jsfunit.facade.ClientIDs.findClientID(ClientIDs.java:169)
      at org.jboss.jsfunit.facade.JSFClientSession.getForm(JSFClientSession.java:153)
      at org.jboss.jsfunit.facade.WebRequestFactory.buildRequest(WebRequestFactory.java:93)
      at org.jboss.jsfunit.facade.JSFClientSession.clickCommandLink(JSFClientSession.java:442)
      


      In addition the link parameter isn't passed when the link is clicked.

      Any ideas? Does my code look wrong?