[Opensource] "zebra striping" question
Peter A. J. Pilgrim
peterp at xenonsoft.demon.co.uk
Wed Jul 31 18:05:09 PDT 2002
Michael Rimov wrote:
> At 11:27 AM 7/23/2002 -0600, you wrote:
>
>> We want to display output objects pulled out of an element iterator in
>> alternating colors. Has anyone done this before? In addition to
>> alternating colors, we would like to display outputs in different
>> places in
>> a table. For example:
>>
>> first position:
>> <tr>
>> <td>one record</td>
>>
>> second, third (any middle) position
>> <td>another record</td>
>>
>> last position:
>> <td>last position</td>
>> </tr>
>
Have you used Struts <logic:iterate> tag. There is a tag attribute called
"indexId" where name a JSP page attribute to store a java.lang.Integer object.
<logic:iterate id="row" name="databaseRows" indexId="counter">
And the current count is <%= counter %>
</logic:iterate>
HTH
>
> Brian,
>
> I haven't really worked much with setting up zebra striping yet with
> Expresso, although if you look at the various mockups Sandra has made
> for different Jcorporate products, you can bet it will be a feature to
> be added soon. ;)
>
> Ideally we'd want to modify the record iterators so that you can query
> whether or not you're on an even or odd record. And then emit a
> different CSS style class for each row.
>
> At least that's how I'd be looking to go about it first.
>
> HTH!
> -Mike
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/
>
--
Peter Pilgrim +-----\ +-++----++----+
Java Technologist | | | || || | 'n' Shine
| O | | || --+| ---+
/\ | ._ / | | \ \ | |
/ \ | | \ \ | |+-- || ---+ A new day
/_ _\ "Up" | | | | | || || | is coming
|| +-+ +-+ +-++----++----+
<home page="http://www.xenonsoft.demon.co.uk/" />
More information about the Opensource
mailing list