Feature Requests item #1013562, was opened at 2004-08-21 21:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=536616&aid=1013562&group_id=73068
Category: main taglib Group: after 1.0 Status: Open Resolution: None Priority: 5 Submitted By: Will Glass-Husain (wglass) Assigned to: Nobody/Anonymous (nobody) Summary: new tag: <display:subRow> Initial Comment: This patch adds a new tag <display:subRow> to DisplayTag The challenge: A number of times recently I've wanted to make a table with multiple rows per item. Usually there is one main row and several "sub-rows" (in the same color) listing non-columnar information. For example, the following table has 3 columns of data about a person, but each row also has a secondary row with a comment about the person going across the whole row. (view in monospace font) . --------------------------- | NAME AGE GRADE | --------------------------- | Johnny 10 5 | | -has trouble reading. | |--------------------------| | Emily 10 5 | | -spends too much time | | daydreaming | |--------------------------| | Albert 10 5 | | -smart kid but goofs off | ---------------------------- It is possible to create such rows with a TableDecorator, but this forces the unpleasant challenge of encoding the specific HTML for the secondary row in the Java class itself. A unique TableDecorator must also be created for every type of row. It's close to impossible to display row-specific info since the TableDecorator is called after the iteration over the record objects is complete. As an alternative, <display:subRow> is an easy way to add one or more rows above or below each list row. By specifying CSS styles that eliminate the upper border for a row, the multi-row block for a record can look like one contiguous row. Example: <display:table id="row"> <display:column title="Name" property="name"/> <display:column title="Name" property="age"/> <display:column title="Name" property="grade"/> <display:subRow oddClass="odd_subrow" evenClass="even_subrow" positionBelow="true"> <td colspan="3"> <c:out value="${row.comment}"/> </td> </display:subRow> </display:table> This is an elegant way to specify additional information about a record that doesn't neatly fit into columnar format. The attached patch is in unified diff format, and is based on displayTag 1.0rc2 snapshot. I tried to follow existing coding guidelines but let me know if you've any suggestions for reformatting. I welcome any comments. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=536616&aid=1013562&group_id=73068 ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ displaytag-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-devel