1 Reply Latest reply on Dec 23, 2011 2:02 AM by pvito

    a4j:commandLink not working inside a4j:repeat

    jmiguel77

      Hi

       

      I have this piece of code:

       

      <a4j:outputPanel id="tabsBarContainer" layout="block"

                          styleClass="tabs-bar-container">

                          <a4j:region>

                                    <a4j:repeat id="tabsRepeat" value="#{commonDM.tabs}"

                                              var="item">

                                              <a4j:commandLink id="testRepeatCommandLink"

                                                        value="#{item.label}" styleClass="inner-tab"

                                                        actionListener="#{tabsBarController.defineCurrentView}" />

                                    </a4j:repeat>

                          </a4j:region>

                </a4j:outputPanel>

       

      The actionListener method called from the commandLink is never reached

       

      I have tried with and without the region, I have tried creating the commandLinks programatically, but neither have worked so far

       

      The commonDM bean is a session scoped bean and the tabsBarController is a view scoped bean

       

      I am using jsf2 and richfaces 4.1 final, in a jboss as 7 server

       

      Can anyone confirm that this is a bug or maybe am i doing something wrong ??

        • 1. Re: a4j:commandLink not working inside a4j:repeat
          pvito

          Hi, Jose

           

          try use c:forEach

           

          <c:forEach items="#{commonDM.tabs}" var="item">

                         

                    <a4j:commandLink id="testRepeatCommandLink"

                              value="#{item.label}" styleClass="inner-tab"

                              actionListener="#{tabsBarController.defineCurrentView}" />

          </c:forEach>