The following comment has been added to this issue:

     Author: Lukasz Racon
    Created: Fri, 17 Dec 2004 2:47 PM
       Body:
this is very simmilar proposition to http://jira.codehaus.org/browse/DISPL-159
except that colspan is determined by tabletag user does not have to provide it 
explicite.
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/DISPL-121?page=comments#action_28143

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/DISPL-121

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: DISPL-121
    Summary: new tag: <display:subRow> (patch included)
       Type: Wish

     Status: Unassigned
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: DisplayTag
 Components: 
             HTML Generation
   Versions:
             1.0 RC2

   Assignee: 
   Reporter: fabrizio giustina

    Created: Fri, 19 Nov 2004 4:22 PM
    Updated: Fri, 17 Dec 2004 2:47 PM

Description:
====
imported from sf tracker
id 1013562 
submitted by Will Glass-Husain - wglass
http://sourceforge.net/support/tracker.php?aid=1013562 
====


 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.


====

Date: 2004-08-22 00:01
Sender: wglass
Logged In: YES 
user_id=643158

Just a quick correction re: my complaint on TableDecorator.  
Yes, you can display row-specific info with 
getCurrentRowObject.  I had trouble with related issues not 
worth discussion in this forum.  Regardless, I think a new tag 
for this purpose is a better approach.





---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to