You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ti...@wellsfargo.com on 2004/07/06 00:34:47 UTC

Proper way to mark initial page load as such?

At work we have a situation where we have a common
action delegating to some sub-actions.  The delegating
action sets up some parameters, and the child action
ALSO sets up some parameters specific to itself that
are required for the initial page display.

However, there are other things done in the child action --
for example, performing a search, doing 2nd-level input
validation, etc.  The problem is, I don't want these more
complex tasks done on the initial page load.

What would be a "standard" way to avoid this kind of thing?
Should I add a "marker" request parameter to the initial
call to the child action?  Should I use field(s) that *should*
have been checked in the form validation (i.e. set the initial
page validation value to "false", and check for a supposedly-validated
field, and if it's not set, validation was never called, so
it's the initial page load)?  This second method was something
suggested by a co-worker, but I think it's pretty sketchy.

Opinions?

- Tim


-------------------- DISCLAIMER --------------------

"This message may contain confidential and/or privileged information.  If
you are not the addressee or authorized to receive this for the addressee,
you must not use, copy, disclose, or take any action based on this message
or any information herein.  If you have received this message in error,
please advise the sender immediately by reply e-mail and delete this
message.  Thank you for your cooperation."

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org