3 Replies Latest reply on Dec 2, 2011 6:15 AM by fernando.gonzalez

    strange a4j:repeat and rich:clientId problem

    m.a.knapp

      I've encountered a strange a4j:repeat and rich:clientId problem:

      In the second a4j:repeat rich:clientId generated wrong IDs

      Is that a bug or did I something wrong ?

      I'm using:
      JBoss 4.2.2 GA
      Richfaces 3.2.2 BETA2
      Facelets 1.1.14
      Sun JSF RI 1.2_04-b16-p02

      jsf sample

      <f:view>
       <a4j:repeat value="#{test.testList}" var="testItem">
       <h:inputText id="input" />
       <h:outputText value="#{rich:clientId('input')}" />
       <br />
       </a4j:repeat>
      
       <a4j:repeat value="#{test.testList}" var="testItem">
       <h:inputText id="input" />
       <h:outputText value="#{rich:clientId('input')}" />
       <br />
       </a4j:repeat>
      </f:view>
      


      related bean code:
      public List<String> getTestList()
      {
       List<String> list = new ArrayList<String>();
       list.add("Test1");
       list.add("Test2");
       list.add("Test3");
       return list;
      }
      


      HTML output
      <body><input id="j_id2:0:input" type="text" name="j_id2:0:input" />j_id2:0:input
       <br /><input id="j_id2:1:input" type="text" name="j_id2:1:input" />j_id2:1:input
       <br /><input id="j_id2:2:input" type="text" name="j_id2:2:input" />j_id2:2:input
       <br /><input id="j_id5:0:input" type="text" name="j_id5:0:input" />j_id2:input
       <br /><input id="j_id5:1:input" type="text" name="j_id5:1:input" />j_id2:input
       <br /><input id="j_id5:2:input" type="text" name="j_id5:2:input" />j_id2:input
       <br />
      
      </body>