Displaytag table summary

I am using the displaytag JSP tag library to create tables that show column totals. For example, the following JSP code will generate totals for only those columns with the attribute total="true"


<display:table name="myTable" id="myTable" decorator="org.displaytag.decorator.TotalTableDecorator">
    <display:column property="name" title="Name" />
    <display:column property="description" title="Description" />

    <display:column property="openCount" title="Opened" total="true"/>
    <display:column property="revenueTotal" title="Commission" total="true"/>


The problem is that displaytag puts these totals in final <tr>

in the body of the table, but I need them to be inside the <tfoot>

header of the table <tfoot>

. Is this possible without post-processing the generated HTML in JavaScript?


source to share

1 answer

Look at the display: footer (how @tvanfosson example works)



All Articles