Is there any
particular reason why an action is instantiated prior to it's action context,
and then the action context isn't even set for the Thread until execute is
called on the proxy? Wouldn't it make sense for an action to know under
what context it is being instantiated?
Why I'm
asking:
We need to set the
model on an action prior to the action being executed so that the
ParamsInterceptor can set some properties on the model. The model is
stored in the current session, having been placed in the session previously by
another action. However, we don't have access to the current session in
the constructor for the action because the context hasn't been set up yet.
Is there a way around this problem? I must be missing something. I
would think that this would be a fairly common pattern.
We're not using
Webwork 2. This is just plain XWork with some custom tie ins to a web
environment.
Any tips would be
appreciated. Thanks,
-Brian