struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Witbeck, Shane" <Shane.Witb...@bankofamerica.com>
Subject opinion on a revised Struts application flow
Date Thu, 17 Jul 2003 20:44:41 GMT
A colleague of mine has suggestion a new "flow" to a wizard-like application
and I thought I would ask the list for their opinion on the matter. 

Traditionally, the Struts convention has been to submit a form to an action
that would handle that forms data and setup the next JSP. I have implemented
this flow and extended DispatchAction to include a couple of methods for
each action which are the following:

1. init() - handles the previous form's data and sets up the initial state
of the next form
2. update() - based on a selection on the form and necessity for a server
trip, this method will do something and return to the form.

The proposed suggestion is to let the initial action handle the form submit
instead of the next action so everything related to a specific JSP form is
contained in one action. The suggestion would add another method in the
DispatchAction as follows:

1. init()
2. update()
3. submitForm() - this would validate and handle the JSP form data as
opposed to the next action handling the data.

Something else that should be mentioned is that we are also implementing the
Unit of Work pattern to handle data in each action. This implementation
would eliminate a dependency of data handled by the previous actions.

Any thoughts or suggestions would be appreciated.

Thanks,

Shane Witbeck

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


Mime
View raw message