tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vernon Wu <>
Subject Re: Iteration tag application
Date Sun, 06 Oct 2002 11:49:17 GMT

Hi, Craig,

Thanks for your input. I, however, have a difficultly of following you. See the below.

10/5/2002 7:38:54 AM, Craig Longman <> wrote:

>On Thu, 2002-10-03 at 16:47, Vernon Wu wrote:
>> The iteration tag like c:forEach is great to retrieve a list of data. I, however,
recently find some sort of dissatisfied 
with its 
>> application. Here are two scenarios to make my this point. One is that after having
a list of data, a user usually will do 
>> some about it, say, take a look at of one of items in the list. I can't see a easy
way to let the user navigate the 
>> or next of item without go back to the list (have to use the back button on the browser).
The second one is in an 
>> example of email client: a list of messages. After a user clicks a message title
in the message list and read it, there 
isn't a 
>> way to indicate the message is read without a DB operation(highlight or not). 
>> It seems to me that it is better off to use MVC to retrieve a list of data, and store
the data in a session scope. This 
>> implementation let developers have more room to work with the list data.
>mvc is often a good way of doing things, and you can certainly make the
>page that displays the initial list invoke a servlet that modifies your
>list item to read, or prepares a next and prev item in the list and
>stores it before invoking the page to be displayed.
I don't get your idea.

>however, the other way would be to have more intelligent objects stored
>in the list.  for the email suggestion, store your own custom email
>object in the list, and it can have an getNew() method on it.  by
>default, that method returns true, but after having been viewed (by the
>second page) it returns false.
>the next and previous problem you pose is reasonably easily handled by
>processing the index of the clicked item: >0 show a previous link for
>index-1; <list.count show a next link for index+1.
>these taglibs are intended as a general purpose tool, what your
>describing are quite specific use cases and will always need to be
>handled specially by the implementor (you) when using a general purpose
>tool.  it only makes sense, if i want to use the c:foreach tag to output
>simple data quickly, then the last thing i want is to have a bunch of
>overhead to track item numbers for a pager or viewed/read status for
>each item.  if i want those things, then i will add the overhead if and
>when i need it.
>make sense?  lemme know if i can help any more.

Sorry, they don't mean sense to me.

>    CraigL->Thx();
>    Be Developer ID: 5852

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message