You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gary Bartlett <ga...@yahoo.com> on 2002/05/20 19:36:06 UTC
nested:iterate -- property accessor called multiple times
I have the following tag in my page:
<nested:iterate property="pageItems">
I notice that the accessor method for pageItems, is
called not only when starting the iteration but also
once for each of the enclosed nested:xxxx tags.
Is this expected behavior ? The reason I ask is that
I have code that I would only like to execute once to
set up the current values for "pageItems". I could
initialize the collection that backs up pageItems to
null, and only execute my code when it is null - but
if I do that I am not sure where I can reset the value
to null after the iterate completes.
For what it is worth, my form bean is defined as
session scope, so I can save state while the user is
interacting with the form.
Gary Bartlett
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>