RE: How to display odd/even rows using iterator

2001-04-19 Thread Zeltser, Mark
plets. = == Mark. > -Original Message- > From: Bart Moberts [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 6:26 AM > To: [EMAIL PROTECTED] > Subject: Re: How to display odd/even rows using iterator > > >

Re: How to display odd/even rows using iterator

2001-04-19 Thread Bart Moberts
hello i do it this way: <%! String[] colors = new String[2]; int i = 0; %> <% colors[0]="#EE"; colors[1]="#CECECE"; i = 0;%> <% i = 1 - i; %> > ... grtz >From: "Zeltser, Mark" <[EMAIL PROTECTED]> >Reply-To: [EMAIL

Re: How to display odd/even rows using iterator

2001-04-19 Thread Bernard Genin
Scott Walter wrote: > Although I don't like to place Java code in my JSP > pages, this is how I accomplished this: > > > <% if(index%2==0) { %> > > <% } else { %> > > <% } %> > > index++; > > > > --- Anthony Martin <[EMAIL PROTECTED]> wrote: > > I'm sure I'll get to this in my project. Why

Paging in Struts (was Re: How to display odd/even rows using iterator)

2001-04-18 Thread james . webster
You would need more than just enhancements to however to have paging functionality similar to the pager taglib at jsptags.com, you would also need tags for the index (previous/next, etc). I've used the pager taglib inconjunction with Struts and find it to work well... is there any point inventi

Re: How to display odd/even rows using iterator

2001-04-18 Thread Ted Husted
Sorry for the confusion. My aside was off-topic and not directly related to the odd/even question (though I ~would~ need to do both in the end result). I meant using iterate instead of something like < http://jsptags.com/tags/navigation/pager/ > David Winterfeldt wrote: > What are you suggesti

Re: How to display odd/even rows using iterator

2001-04-18 Thread David Winterfeldt
What are you suggesting when you mention having iterate work like a pager? Do you mean having the iterate tag call a method on a bean before or after it iterates? If the interface gave the bean a handle on the environment then it could even a create a variable that could have the row color. Dav

RE: How to display odd/even rows using iterator

2001-04-18 Thread Scott Walter
u need is a way to change that value at > the top of the > block by detecting the current state > with a couple > tag. > > > Anthony > > -Original Message- > From: Ted Husted [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 1:07 PM > To: [EMAIL

RE: How to display odd/even rows using iterator

2001-04-18 Thread Anthony Martin
} Then all you need is a way to change that value at the top of the block by detecting the current state with a couple tag. Anthony -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 1:07 PM To: [EMAIL PROTECTED] Subject: Re: How to display

Re: How to display odd/even rows using iterator

2001-04-18 Thread Ted Husted
I like Christine's answer better, but here's a simple solution using (ugh) a scriptlet. <% int i = 0; %> <% i++; if ( i % 2 == 0) { %> <% } else { %> <% } %> { columns } What I would really like to see (before I write it myself) is code for using iterate as a pager. The hooks seem

RE: How to display odd/even rows using iterator

2001-04-18 Thread Christine Robb
Sent: Wednesday, April 18, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: How to display odd/even rows using iterator Hello, I have the following code to

Re: How to display odd/even rows using iterator

2001-04-18 Thread Chris Butler
I used a simple java/jsp hack to do this for something similar (multiple columns for one resultset), but maybe there's a better way. One thing I noticed is that didn't seem to like an integer primitive as opposed to a String. <% int rowCount= 0; int columnMod = 0; %> <%

How to display odd/even rows using iterator

2001-04-18 Thread Zeltser, Mark
Hello, I have the following code to build the table: ==