0 Replies Latest reply on Apr 20, 2012 3:21 AM by nimo stephan

    ui:repeat id generation

    nimo stephan Master

      I have something like this:



      <a4j:repeat var="_o" value="#{bean.list}">

           <a4j:outputPanel id="panel_#{_o.id}" layout="block">

              <h:outputText value="#{_o.id}"/>




      <!--id "panel_5" would reference to my panel above, but I cannot generate the id within the iteration loop -->

      <a4j:commandLink render="panel_5"


                                  value="#{_o.contact.firstName} #{_o.contact.lastName}" />



      So you see, JSF does not allow me to generate id's inside iteration-loops (jsf automatically generates ids for my panel).


      Does anyone know, how I can achieve something like this? As {_o.id} is unique I would have no duplicate ids.


      I need this kind of generation as I want to update my panel from outside via ajax.


      I do not want to use rich:datatable with ajaxkeys. Unfortunately, I cannot see ajaxkeys in a4j:repeat.


      Am I forced to use c:forEach instead of a4j:repeat ??