>  The reason I want to do this is that my pages are stateless, and I want to
> process the submitted form before all the components on the page are
> initialised, incase I need to load different data models, or redirect the
> request to another page, thus saving unnecessary database calls and
> component initialisation.
>
>  At the moment what I am doing is processing the form by directly reading
> the page parameters in the constructor before I add any components to the
> page, and then redirecting the request or initializing the page as
> appropriate (bypassing the use of Form.onSubmit).

If you make sure your models/ components work lazily you can avoid
database calls being done until the components are actually rendered.
Rendering is a separate phase executing after component construction
and form handling. And you can let your form just populate a simple
bean to avoid database access. I wouldn't worry about the creation of
a few components, and you can break of any time with a
RestartResponseException or set the next page (without breaking off
current processing) using setResponsePage.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to