3 Replies Latest reply on Mar 25, 2010 8:45 AM by Nick Belaevski

    collapse data table - again

    odelya yomtov Novice

      Hi!

       

      I am still stuck with collapsing datatable.

       

      My code is:

       

      <rich:dataTable value="#{inventoryBean.records}" var="inventoryRecord">
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column>
      <h:outputText value="Sales unit name" />
      </rich:column>
      <rich:column>
      <h:outputText value="Start Date" />
      </rich:column>
      <rich:column>
      <h:outputText value="End Date" />
      </rich:column>
      <rich:column>
      <h:outputText value="Day Part" />
      </rich:column>
      <rich:column>
      <h:outputText value="Start Time" />
      </rich:column>
      </rich:columnGroup>
      </f:facet>
      <rich:columnGroup>
      <rich:column>
      <h:outputText value="#{inventoryRecord.bInventory.salesUnitId}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{inventoryRecord.bInventory.dayPart}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{inventoryRecord.bInventory.startTime}" />
      </rich:column>
      </rich:columnGroup>
      <rich:subTable var="bWeeklyIventory"
      value="#{inventoryRecord.bWeeklyIventory}">
      <rich:column>
      <h:outputText value="#{bWeeklyIventory.startDate}"></h:outputText>
      </rich:column>
      <rich:column>
      <h:outputText value="#{bWeeklyIventory.endDate}"></h:outputText>
      </rich:column>
      </rich:subTable>
      </rich:dataTable>
      How do I collapse the subtable ane expand it when clicking on a row in datatable?