5 Replies Latest reply on Mar 31, 2009 9:07 AM by Ilya Shaikovsky

    Layout problem with subtable

    Stijn Cremers Novice

      Hi folks,

      I have a layout problem with using the subtable.
      When i used the subtable in combination with a filterfield on a column, i get a extra column in the row where the filter is displayed.

      I have found a jira for this problem but they say it should work.... but i don't think they tested it in combination with a filter
      https://jira.jboss.org/jira/browse/RF-3786

      <rich:dataTable
       value="#{configureCarrierBean.countryCarrierTransitCountryList}"
       var="countryCarrierTransitCountry"
       width="600px;"
       rows="10"
       reRender="carrierTransitCountryDs"
       rendered="#{not empty configureCarrierBean.countryCarrierTransitCountryList}"
       onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
      
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column>#{msg.destination}</rich:column>
       <rich:column>#{msg.transitCountry}</rich:column>
       <rich:column>#{msg.beginDate}</rich:column>
       <rich:column>#{msg.endDate}</rich:column>
       <rich:column> </rich:column>
       </rich:columnGroup>
       </f:facet>
      
       <rich:column filterBy="#{countryCarrierTransitCountry.countryDescription.description}" filterEvent="onkeyup">
       #{countryCarrierTransitCountry.countryDescription.description}
       </rich:column>
       <rich:column>
       ...
       </rich:column>
       <rich:column> </rich:column>
       <rich:column> </rich:column>
       <rich:column> </rich:column>
      
       <rich:subTable
       onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       var="transit" value="#{countryCarrierTransitCountry.transits}">
       <rich:column> </rich:column>
       <rich:column>
       ...
       </rich:column>
       <rich:column>
       ...
       </rich:column>
       <rich:column>
       ...
       </rich:column>
       <rich:column>
       ...
       </rich:column>
       </rich:subTable>
      
       <f:facet name="footer">
       <rich:datascroller id="carrierTranitCountryDs" renderIfSinglePage="false"></rich:datascroller>
       </f:facet>
      </rich:dataTable>
      
      


        • 1. Re: Layout problem with subtable
          Ilya Shaikovsky Master

          Remove filtering and add just header facet to this column with some outputText. Nothing will be changed. So design issue again. The code from livedemo works fine for me.

           <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" filterBy="#{record.city}">
           <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>
          


          • 2. Re: Layout problem with subtable
            Stijn Cremers Novice

            where should i place the filter?
            i don't get it....

            • 3. Re: Layout problem with subtable
              Ilya Shaikovsky Master

              b.t.w. there was one more problem about such markups fixed in 3.3.1Beta 2. try please.

              • 4. Re: Layout problem with subtable
                Stijn Cremers Novice

                it is fixed in the 3.3.1 beta, when will this version become GA?

                • 5. Re: Layout problem with subtable
                  Ilya Shaikovsky Master

                  We plan to release GA in the beggining of May.