Multiple dataTable footer rows in RF 4.0
tiddman May 11, 2011 7:04 PMWe are using RF 4.0 and need a table that looks something like this.
Name | X | Y | Z |
---|---|---|---|
This | 10 | 20 | 30 |
That | 10 | 20 | 30 |
The Other | 10 | 20 | 30 |
Subtotal | 30 | 60 | 90 |
Adjustments | -5 | 5 | -10 |
Total | 25 | 65 | 80 |
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.