2 Replies Latest reply on May 18, 2010 3:31 AM by sergio martin

    a4j:commandLink not working inside a4j:repeat

    sergio martin Newbie

      Hello everybody.

      I have this piece of code. Everything is rendering fine, but somehow, the links inside the repeat are not arriving to the server.

      What´s weird is that the first part of the code (the one that is not inside the repeat) is working fine. To my eyes, both are the same and, at least, are rendering equally in my browser.

       

      I´m new to richfaces... any clue?

      (The value of the param is hardcoded for testing purposes...)

       

      Thanks a lot!!

       

      CODE:

       

               <a4j:form>

       

                      <div>

                          <a href="#" title="">John Doe</a>

                          <a4j:commandLink reRender="results-view" action="#{actionsContainer.userManagementActions.loadUser}" title="Edit" styleClass="edit">

                              <f:param name="userName" value="john"/>                       

                              <h:outputText value="Edit" /> <small>Edit user<b></b></small>

                              <a4j:support event="onclick">

                                  <f:setPropertyActionListener value="../user-mng/users-edit.xhtml" target="#{layout.displayAs}" />

                              </a4j:support>

                          </a4j:commandLink>               

                      </div>

       

                      <a4j:repeat value = "#{usersBean.users}" var = "user">           

                          <div>

                              <a href="#" title=""><h:outputText value = "#{user.firstname}"/><h:outputText value=" " escape="false" /><h:outputText value = "#{user.lastname}"/></a>

                              <a4j:commandLink reRender="results-view" action="#{actionsContainer.userManagementActions.loadUser}" title="Edit" styleClass="edit">

                                  <f:param name="userName" value="john"/>                            

                                  <h:outputText value="Edit" /> <small>Edit user<b></b></small>

                                  <a4j:support event="onclick">

                                      <f:setPropertyActionListener value="../user-mng/users-edit.xhtml" target="#{layout.displayAs}" />

                                  </a4j:support>

                              </a4j:commandLink>

                          </div>

                      </a4j:repeat>

       

                  </a4j:form>