struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Brown <>
Subject Re: Select collection not found only when validation xml file is used
Date Wed, 13 Apr 2011 15:51:32 GMT
On Wed, Apr 13, 2011 at 11:27 AM, Eric Lentz <> wrote:
> Thanks for the help. My problem appears to be solved! prepare() is my
> friend.

One subtle gotcha you should be aware of in case it bites you later:
In the default interceptor stack, the prepare method is set to execute
BEFORE the params from your form are read and processed into your
action class. If you are relying on those form params in your prepare
method to initialize values or whatever, you may get errors that look
mysterious unless you step through the whole stack.

There is a separate interceptor stack, "paramsPrepareParamsStack",
defined to help with this problem - it has an extra Params processor
that fires before Prepare to make sure all your form data is available
when Prepare runs. You can see it here: (edit the
version number to fit your implementation). The stack definition is
near the end, just do a search for "paramsPrepareParams".

 - Aaron

Aaron Brown :

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

View raw message