Hi,
I just posted a patch for a new tag
<display:subRow> in the issueTracker.
I'm a happy user of DisplayTag, but a new
contributor. This tag solves a pressing issue I've been facing, namely how
to display multiple rows for a single record. (for example, a main row of
columnar data, followed by a row with a comment that spans multiple
columns). See the issue for an example, but to summarize, it works like
this:
<display:table id="row"> <display:column title="Name" property="name"/> <display:column title="Name" property="age"/> <display:column title="Name" property="grade"/> <display:subRow>
<td colspan="3"> <c:out value="${row.comment}"/> </td> </display:subRow> </display:table>
This displays a 3 colspan row below every main row. By setting
various attributes, you can control whether the row goes above or below the man
row. You can also set the CSS style (separate from the main row) allowing
the elimination of internal borders. (Making the multi-line record look
like one contiguous row).
I was wondering if anyone had any comments on this
approach. I played with using TableDecorators to implement this, but found
them unsuitable for a variety of reasons. (the agony of including HTML in
my Java code and the lack of reusability).
If this patch is accepted into the code base
(presumably for post 1.0 version) I'd be happy to work on docs, examples,
etc.
Best, WILL ___________________________________
Forio Business Simulations |
- [displaytag-devel] <display:subRow> Will Glass-Husain
- Re: [displaytag-devel] <display:subRow> Matt Raible