[ http://jira.codehaus.org/browse/DISPL-151?page=comments#action_42672 ]
Jeff Sheets commented on DISPL-151: ----------------------------------- I also voted on this issue, and would love to see it completed soon. Until this feature is added I am added a grouping master header row by using this javascript at the end of the page: /* This javscript block adds a master header row to the table */ function appendHeaderCell(theadRow, colSpan, className, text) { var headCell = theadRow.insertCell(theadRow.cells.length); headCell.colSpan = colSpan; headCell.className = className; headCell.innerHTML = text; } var masterRow = document.getElementById("myDisplayTagTableId").tHead.insertRow(0); appendHeaderCell(masterRow, 1, "", ""); //First column doesn't have a grouped header appendHeaderCell(masterRow, 3, "reportheader master-reportheader", "NAME"); //The next three columns are grouped appendHeaderCell(masterRow, 2, "", ""); //These two are not grouped appendHeaderCell(masterRow, 4, "reportheader master-reportheader", "TEST GROUP"); //The next 4 columns are grouped > Column grouping and 2 row headers > --------------------------------- > > Key: DISPL-151 > URL: http://jira.codehaus.org/browse/DISPL-151 > Project: DisplayTag > Type: New Feature > Components: Tag Library > Versions: 1.0 RC2 > Reporter: Jonathan Koppenhofer > Priority: Minor > Attachments: ColGrouping.jpg > > > It would be nice to be able to group columns together so that the table > header has 2 rows to show groupings. For example, I want to display a list of > people with info about the person. I would like to have a header like: > | | NAME | | | > | |-----------------------| | | > | PERSON_ID | LAST | FIRST | MIDDLE | PHONE | DEPARTMENT |... > ---------------------------------------------------------- > Data... > I envision something like... > <display:table id="searchResults" name="..." > > <display:column property="id" title="PERSON_ID"/> > <display:column title="NAME"> > <display:column property="lastName" title="LAST"/> > <display:column property="firstName" title="FIRST"/> > <display:column property="middleName" title="MIDDLE"/> > </display:column> > <display:column property="phone" title="PHONE"/> > <display:column property="dept" title="DEPARTMENT"/> > </display:table> > or > <display:table id="searchResults" name="..." > > <display:column property="id" title="PERSON_ID"/> > <display:column property="lastName" title="LAST" GROUP="NAME/> > <display:column property="firstName" title="FIRST" GROUP="NAME/> > <display:column property="middleName" title="MIDDLE" GROUP="NAME/> > <display:column property="phone" title="PHONE"/> > <display:column property="dept" title="DEPARTMENT"/> > </display:table> > ... where "GROUP" is a new attribute. > I would also expect that it would still be able to preserve sorting on the > grouped columns. For example, I would still be able to sort on first, last, > and middle names. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel