0 Replies Latest reply on Aug 2, 2007 8:15 PM by petedog

    Problem with an a4j form/submit inside a nested loop

    petedog

      I'm having a problem with an ajax submit in a nested ui:repeat loop. I'm not sure if it's possible to do it this way, but if someone could suggest something different or making this work, I would really appreciate it.

      I'm basically drawing up a a bunch of tabs and each of the tabs has a form that I'd like to do a submit on when the values in that tab changes.

      When I call the <a4j:commandButton value="Save Changes" action="#{projectAction.updateTab}" /> without nesting it in the ui:repeat it works just fine, it's when I nest it I run into trouble and the projectAction.updateTab method on the backend doesn't even get called.

      I'd appreciate any help I can get to make this work.


      
      <ui:repeat value="#{projectDetail.subProjects}" var="subProject">
       <div class="aTab">
       <div id="phaseTabView#{subProject.id}">
      
       ............
      
       <ui:repeat value="#{subProject.checklists}" var="checklistDTO">
       <div class="aTab" id="checklist#{checklistDTO.id}">
       <a4j:region id="checklistRegion">
       <h:panelGroup id="checklistPanel">
       <h:form id="checklistForm">
       <table>
       <tr>
       <td>
       <table >
       <ui:repeat value="#{checklistDTO.checklistItems}" var="checklistItemDTO">
       <tr>
       <td><a href="#"><h:outputText value="#{checklistItemDTO.checklistName}" /></a></td>
       </tr>
       </ui:repeat>
       </table>
       </td>
       </tr>
       <tr>
       <td><a4j:commandButton value="Save Changes" action="#{projectAction.updateTab}" /></td>
       </tr>
       </table>
       </h:form>
       </h:panelGroup>
       </a4j:region>
       </div>
       </ui:repeat>
      
       .............................
      
       </div>
       </div>
      
      </ui:repeat>