抱歉,晚会晚了 7 个月,但尝试使用MultilevelTotalTableDecorator
装饰器,它会根据您的要求生成一个空行,但这确实是装饰器应该做的副作用。您必须尝试使用其他选项才能让它做您想做的事情。
<%
// you can do this as a scriptlet on the page, but i put it into a taglib...
org.displaytag.decorator.MultilevelTotalTableDecorator subtotals = new org.displaytag.decorator.MultilevelTotalTableDecorator();
subtotals.setGrandTotalDescription(" "); // optional, defaults to Grand Total
subtotals.setSubtotalLabel(" ", null);
pageContext.getRequest().setAttribute("subtotaler", subtotals);
%>
<display:table name="contacts" id="contactRow" defaultsort="1" defaultorder="ascending" decorator="subtotaler">
<display:column property="contactType" title="Contact Type" total="true" group="1"/>
<display:column property="contactDate" format="{0,date,MM/dd/yyyy}" title="Date" />
<display:column property="contactName" title="Name" />
<display:column property="contactPhone" title="Phone" />
<display:column property="contactEmail" title="Email" />
</display:table>