Hi.

I set up a little website as a way to teach myself Struts. It's a
user-maintained directory of electric vehicle charging locations. It's
hardly complete, but there was one thing I wanted to do and didn't see an
obvious way.

Each Location has a bunch of user-supplied comments associated with it. My
code currently displays all of the comments in reverse chronological order.
What I'd really like to do is display only the first N such comments.

Now, I'm pretty sure that I'm capable of making my own iterator tag(s) to do
this, and the related action of iterating over the items N through M. I also
realize that this will only work correctly for certain types of collection
(Vectors, for example, or arrays), although I suspect it can be made to be
repeatable for any type of collection.

I guess I'm making a feature request, and looking for comments as to whether
it's a good idea to add this functionality to the existing iterator tags or
to create new tags to do it.

Another related iterator action that I'd like to be able to perform is a
more controlled iteration. I had a situation where I wanted to construct a
string of items, separated by commas, but couldn't find an easy way to avoid
an extra comma either at the end or beginning of the string. A set of tags
to a) set up an iteration, b) get the current item, c) advance to the next
item, and d) iterate over the remaining items would be useful, don't you
think?

Comments appreciated...

-- 
Rick



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to