Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Re: adding values to a variable inside iterator tag

dusty

2009-07-03

Replies: Find Java Web Hosting

Author LoginPost Reply

I think his point is that his view template is going to iterate these objects
anyways, he just did not include the additional layout html for the
resultsList.  I don't think he was suggesting that getting a count by
looping is better done in JSP tags rather than the action class. I am sure
there is some form of branching logic that is also not shown otherwise he
would just use resultsList.size.



DNewfield wrote:
>
> Bhaarat Sharma wrote:
>> But in this case why would I write another for loop to do
>> something that can be done in the for loop that I already have?
>
> Maybe learning about the life cycle of even a simple tag will convince
> you that doing unnecessary computation within the display layer is a
> mistake:
>
> http://java.sun.com/webservices/docs/1.6/api/javax/servlet/jsp/tagext/Tag.html
>
> Especially the more complex life cycles of more detailed tags (since
> s:set can have a body, it's got to implement BodyTag, I believe) :
>
> http://java.sun.com/webservices/docs/1.6/api/javax/servlet/jsp/tagext/IterationTag.html
> http://java.sun.com/webservices/docs/1.6/api/javax/servlet/jsp/tagext/BodyTag.html
>
> And since your summation actually did the work through OGNL, you also
> add the parsing/evaluation computational expense each time through that
> loop.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.