struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Geary <>
Subject Re: IterateTag Enhancement: Specify Collection Explicitly
Date Sun, 02 Jul 2000 18:35:05 GMT
Marius Sorin Barduta wrote:

> > David Geary wrote:
>  > I object to being forced to store a collection in a servlet scope just so
> that I
> > can iterate over it. Iteration should work on all beans, regardless of
> where they
> > are stored.
> Well, if one doesn't create the bean outside the JSP page (for example in an
> Action) one may create it in the JSP page itself. It's ok with this approach
> but IMHO this goes a little against one of the proposed goals for Struts
> framework, that is to separate the business logic from the presentation as
> much as possible. So, why not force struts users in a better programming
> habit than that they are used to?
> :-)

Because the tag does not force Struts users to do anything. A business logic
collection can still be created in a JSP page, put in session scope, and
iterated over.

The problem here, as far as I see it, is that a tag named IterateTag should
provide the ability to iterate over any bean, not just those stored in a servlet
scope. If it doesn't, it should be called something other than an iterator


View raw message