1 Reply Latest reply on May 16, 2011 11:53 AM by tiddman

    Multiple dataTable footer rows in RF 4.0

    tiddman

      We are using RF 4.0 and need a table that looks something like this.

       

      NameXYZ
      This102030
      That102030
      The Other102030
      Subtotal306090
      Adjustments-55-10
      Total256580

       

      The three blue rows are footers.  This is a simplified example, in my app the body is 3 nested collapsible sub-tables and the roll-up math is more complex.  I need to render the footer for this table with three rows.

       

      I have tried this:

       

      <f:facet name="footer">

          <rich:columnGroup>

              <rich:column>

                  <h:outputText value="Subtotal" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.sub1]" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.sub2}" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.sub3}" />

              </rich:column>

          </rich:columnGroup>

          <rich:columnGroup>

              <rich:column>

                  <h:outputText value="Adjustments" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.adj1]" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.adj2}" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.adj3}" />

              </rich:column>

          </rich:columnGroup>

          <rich:columnGroup>

              <rich:column>

                  <h:outputText value="Total" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.total1]" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.total2}" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.total3}" />

              </rich:column>

          </rich:columnGroup>

      </f:facet>

       

      But only the first footer row is rendered and the other two are ignored.  I tried this:

       

      <f:facet name="footer">

          <rich:columnGroup>

              <rich:column>

                  <h:outputText value="Subtotal" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.sub1]" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.sub2}" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.sub3}" />

              </rich:column>

       

              <rich:column breakBefore="true">

                  <h:outputText value="Adjustments" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.adj1]" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.adj2}" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.adj3}" />

              </rich:column>

       

              <rich:column breakBefore="true">

                  <h:outputText value="Total" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.total1]" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.total2}" />

              </rich:column>

              <rich:column>

                  <h:outputText value="#{var.total3}" />

              </rich:column>

          </rich:columnGroup>

      </f:facet>

       

      But it renders a single row with 12 columns, instead of 3 rows with 4 columns each.

       

      I have tried some other variations of this (without a columnGroup, etc) but can't get it to render correctly.  Does anyone have any other suggestions?  Thank you very much in advance.

        • 1. Multiple dataTable footer rows in RF 4.0
          tiddman

          We never came up with a solution to this, and ultimately decided not to use collapsibleSubTables for this page (even though in theory they seem to be exactly what we need), due to this and other problems.  It seems that collapsibleSubTables are not fully baked in RF 4.0 at this moment.

           

          For tables like this:

           

          Title 1

               Subtitle 1.1

                    Row 1.1.1

                Subtitle 2

                    Row 1.2.1

                    Row 1.2.2

           

          Each row contains inputText's for numeric fields.  I found that conversion errors are not displayed for the first row (1.1.1), but are displayed for the other rows (1.2.1 and 1.2.2).  For example if I enter "x" for the numeric field, I will get an error message like this:

           

          lsform:oppProductTable:1:productSubtable:0:productOppSubtable:0:editProductOppQuantity: 'x' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction. Example: 198.23

           

          ...in the 2nd and subsequent rows, but not the first row.  For the first row, the previous value (before the edit) is submitted to the validator.  So it seems like the conversion error does not occur for the first row.

           

          Another issue is that columnGroups don't seem to work for the nested collapsibleSubTable.  Here is simplified JSF code:

           

          <rich:dataTable>

             <rich:collapsibleSubTable>

                 <rich:collapsibleSubTable>

                         <rich:column>x</rich:column>

                         <rich:column>y</rich:column>

                         <rich:column>z</rich:column>

                         <rich:column colspan="3" breakBefore="true">summary</rich:column>

                 </rich:collapsibleSubTable>

              </rich:collapsibleSubTable>

          </rich:dataTable>

           

          The "breakBefore" is not respected, and the table renders with 4 columns.  I tried it with various configurations of columnGroups:

           

                      <rich:columnGroup>

                         <rich:column>x</rich:column>

                         <rich:column>y</rich:column>

                         <rich:column>z</rich:column>

                         <rich:column colspan="3" breakBefore="true">summary</rich:column>

                      </rich:columnGroup>

           

                      <rich:columnGroup>

                         <rich:column>x</rich:column>

                         <rich:column>y</rich:column>

                         <rich:column>z</rich:column>

                      </rich:columnGroup>

                      <rich:columnGroup>

                         <rich:column colspan="3" breakBefore="true">summary</rich:column>

                      </rich:columnGroup>

           

                     <rich:column>x</rich:column>

                     <rich:column>y</rich:column>

                     <rich:column>z</rich:column>

                      <rich:columnGroup>

                         <rich:column colspan="3" breakBefore="true">summary</rich:column>

                      </rich:columnGroup>

           

                      <rich:columnGroup>

                         <rich:column>x</rich:column>

                         <rich:column>y</rich:column>

                         <rich:column>z</rich:column>

                      </rich:columnGroup>

                     <rich:column colspan="3" breakBefore="true">summary</rich:column>

           

           

          etc. but could not get it to render as it should.  It seems like columns that are within a columnGroup are ignored, only columns outside of the group are rendered, but breakBefore is not respected.