2 Replies Latest reply on Oct 29, 2009 9:01 AM by nbelaevski

    regarding the demo example given

    ashutoshdeora

      this issue have already been solved in JIRA
      https://jira.jboss.org/jira/browse/RF-3786

      there is still a problem with the extra

      when i use

      <rich:dataTable value="#{capitalsBean.capitals}" var="capital">
       <rich:column>
       <f:facet name="header">Capital Name</f:facet>
       </rich:column>
       <rich:column>
       <f:facet name="header">Property Name</f:facet>
       </rich:column>
       <rich:column>
       <f:facet name="header">Property Value</f:facet>
       </rich:column>
      
      
      
      <rich:subTable value="#{capital.detailList}" var="detail">
       <rich:column />
       <rich:column>
       <h:outputText value="#{detail.key}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{detail.value}" />
       </rich:column>
       </rich:subTable>
       </rich:dataTable>
      
      

      THE EXAMPLE DEMO WHICH IS MENTIONED ABOVE IS FROM THE LIVEDEMO OF EXADEL SITE THEN I WANT TO COMMENT ON THAT

      THIS IS THE EXAMPLE IF I AM NOT WRONG MENTIONED IN THE REPORT


      -----
      <rich:dataTable
       onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0"
       width="700" border="0" var="record" value="#{report.expReport.records}">
      
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column rowspan="2">
       <rich:spacer />
       </rich:column>
       <rich:column colspan="3">
       <h:outputText value="Expenses" />
       </rich:column>
       <rich:column rowspan="2">
       <h:outputText value="subtotals" />
       </rich:column>
       <rich:column breakBefore="true">
       <h:outputText value="Meals" />
       </rich:column>
       <rich:column>
       <h:outputText value="Hotels" />
       </rich:column>
       <rich:column>
       <h:outputText value="Transport" />
       </rich:column>
       </rich:columnGroup>
       </f:facet>
      
       <rich:column colspan="5">
       <h:outputText value="#{record.city}" /></rich:column>
      
      
       <rich:subTable
       onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       var="expense" value="#{record.items}">
       <rich:column>
       <h:outputText value="#{expense.day}"></h:outputText>
       <f:facet name="footer">
       <rich:spacer />
       </f:facet>
       </rich:column>
       <rich:column>
       <h:outputText value="#{expense.meals}"><f:convertNumber pattern="$####.00" /></h:outputText>
       <f:facet name="footer">
       <h:outputText value="#{record.totalMeals}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </f:facet>
       </rich:column>
       <rich:column>
       <h:outputText value="#{expense.hotels}"><f:convertNumber pattern="$####.00" /></h:outputText>
       <f:facet name="footer">
       <h:outputText value="#{record.totalHotels}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </f:facet>
       </rich:column>
       <rich:column>
       <h:outputText value="#{expense.transport}"><f:convertNumber pattern="$####.00" /></h:outputText>
       <f:facet name="footer">
       <h:outputText value="#{record.totalTransport}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </f:facet>
       </rich:column>
       <rich:column>
       <rich:spacer></rich:spacer>
       <f:facet name="footer">
       <h:outputText value="#{record.total}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </f:facet>
       </rich:column>
      
       </rich:subTable>
      
       <f:facet name="footer">
      
       <rich:columnGroup>
       <rich:column>Totals</rich:column>
       <rich:column>
       <h:outputText value="#{report.expReport.totalMeals}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </rich:column>
       <rich:column>
       <h:outputText value="#{report.expReport.totalHotels}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </rich:column>
       <rich:column>
       <h:outputText value="#{report.expReport.totalTransport}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </rich:column>
       <rich:column>
       <h:outputText value="#{report.expReport.grandTotal}"><f:convertNumber pattern="$####.00" /></h:outputText>
       </rich:column>
       </rich:columnGroup>
       </f:facet>
      
       </rich:dataTable>
      
      

      -------



      this dataTable in the above is using <rich:columnGroup>
      it is fine when using the property
      but the dataTable losses some of its property like ---- sortBy , which is one of the features in dataTable
      if this is the case then is there any solution to this that i will retain the like ---- sortBy and doesnot face the problem of of extra

      if <rich:columnGroup> is the only solution please comment on this
      and another way i can use <rich:subDataTable> and donot get the extra