3 Replies Latest reply on Feb 24, 2015 11:48 AM by michpetrov

    <rich:collapsibleSubTable> with a4j:repeat

    lordalucard7545

      Hi,

      it is possible to use a4j repeat or ui repeat with the rich:collapsibleSubTable component, I tried to nest it but it did not work




        • 1. Re: <rich:collapsibleSubTable> with a4j:repeat
          michpetrov

          Hi,

           

          it is possible to use it with the subtable but first we need to know what you're trying to do.

          • 2. Re: <rich:collapsibleSubTable> with a4j:repeat
            lordalucard7545

            hi thanks for coming in,

            the first load of the page does not display these items included in the second foreach, it displays only the other column but when I refresh the page, elements contained in the second foreach appears.

             

             

            <rich:dataTable style="width: 556px;vertical-align:top;"
               value="#{object.list1}" var="x">
            
               <rich:column style="background-color: #F5F5F5;width :230px;">
                <rich:collapsibleSubTableToggler for="sbtbl" />
                <f:facet name="header">
                 <h:outputText
                  value="nom" />
                </f:facet>
                <h:outputText
                 value=" #{x.name} "
                 style="font-weight: bold;">
                </h:outputText>
               </rich:column>
               
              
               <c:forEach items="#{object.columnList}" var="item">
                <rich:column style="background-color: #F5F5F5;">
                 <f:facet name="header">
                  <h:outputText value="#{item.value}" style="font-weight: bold;" />
                 </f:facet>
                </rich:column>
               </c:forEach>
               <rich:column style="background-color: #F5F5F5;width :50px">
                <f:facet name="header">
                 <h:outputText
                  value="Total" />
                </f:facet>
               </rich:column>
            
               <rich:collapsibleSubTable expanded="#{false}" value="#{x.list2}" var="y"
                onrowclick="#{object1.getOp(x,y)}"
                 id="sbtbl">
                <rich:column>
                 <h:outputText value="#{y.name}" />
                </rich:column>
            
                <c:forEach
                 items="#{object1.optList}"
                 var="items">
             
                 <rich:column>
                  <a4j:commandLink value="#{items.totaux}"
                   rendered="#{items.totaux!=0}">
                   <rich:tooltip mode="client">
                    <h:panelGrid>
                     <a4j:repeat value="${items.opList}" var="op">
                      <h:panelGrid columns="3">
                       <h:panelGrid style="min-width:120px;">
                        <h:outputLabel value="#{op.code}" />
                       </h:panelGrid>
                 
                       <h:panelGrid style="min-width:60px;text-align:right;"
                        columns="2">
                        <h:panelGrid style="width:80px;">
                         <h:outputText value="#{op.number}" style="color:blue;">
                         </h:outputText>
                        </h:panelGrid>
                       </h:panelGrid>
                      </h:panelGrid>
                     </a4j:repeat>
                    </h:panelGrid>
                   </rich:tooltip>
                  </a4j:commandLink>
                 </rich:column>
                </c:forEach>
                <rich:column>
                 <h:outputText value="#{y.total}" />
                </rich:column>
               </rich:collapsibleSubTable>
            
              </rich:dataTable>
            
            
            • 3. Re: <rich:collapsibleSubTable> with a4j:repeat
              michpetrov

              It works for me (RichFaces 4.5.2, Mojarra 2.2.9, WildFly 8.2), although I changed the layout a little and removed the <ec:spacer> (where is that from?)

               

              Can you try reducing the sample (sscce.org) and provide the lists as well? You can also check the generated HTML, if the columns are generated and just not visible.