I looked into the taglib source a bit more, and I see your point. Assuming
David is talking about overriding certain methods in the TableDecorator, as
you pointed out, then there isn't any way to modify the contents of the <tr>
or <td> tags.

If the startRow() method is overridden it provides the ability to wrap the
<tr/> in another set of tags. I suppose this was added to provide some form
of grouping support? I could imagine that a set of rows may belong in their
own <tbody> tags? Or maybe the onFinishRow() could be overridden to provide
a subtotal.

Either way, there isn't any way to change the contents of the <tr> or <td>
using a TableDecorator AFAICT. However, it would be a very easy change to
add by providing another method in the TableDecorator class along with the
"Cell" equivalent callbacks.

> -----Original Message-----
> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> I'm not sure David's solution would work since, afaict, this would
> output two <tr> tags, wouldn't it?
> (There is a startRow() and an endRow() (or finishRow()) method in
> TableDecorator which you can override, but i've never really understood
> how it could be used)
> 
> >>[EMAIL PROTECTED] On Behalf Of David G. Friedman
> >>Why not use a Decorator and override startRow() to open the "<tr>..."
> your
> >>own way depending on the row number?  I've only made one decorator (not
> >>lately) so I can't tell you offhand how to do it but there is a row
> object
> >>and it does have a method isOddRow() or even getRowNumber().  You would
> >>just
> >>have to skim through the decorator examples on how to access that
> method.



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to