Saturday, November 04, 2006

Display tag library

Got a great tip - thanks, Jasi.

displaytag is a great TLD for building tables in JSP files. Helped me to reduce my table formatting code from like 50 lines in a JSP (all with grouping etc) based on standard JSTL tags to just 12 lines:
<display:table ...>
<display:column .../>
<display:column .../>
... (10 columns alltogether)
</display:table>

Works great.
Does grouping and totals/subtotals according to those groups itself.
Allows for various formatting customizations.

Just one bug annoys me - seems to have to do with the data types I use:
When building a total sum it breaks with a ClassCastException... bug has already been filed; I'm waiting for the fix.

technorati tags: , , ,

No comments: