Hi Daniel,

I agree that you should have several actions for a single form.
Fortunately, you can do this with Strut's DispatchAction.  I make extensive
use of in the project I am working on.

I think everything you described in your 6 step scenario can be done with a
combination of dispatch actions, the commons validator, and Strut's
declarative exception handling.  You should check out the documentation on
Jakarta's site or purchase one of the many books about Struts.  The O'Reilly
book is IMHO not so great, but at least it does a good job explaining all of
the features of Struts so at least I knew where to look.

Matt
----- Original Message -----
From: "Daniel Steudel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2003 11:19 AM
Subject: Controller and Actions


hi folks,
i am working on a project right now for which i figured out struts to be
perfectly suitable. but as i looked at it a little closer i saw some
issues in the "struts way" i don't agree with. the main problem is that
you think of a 1-to-1 relation between a form and an action (i think so
'cause you send a form to an (action-)controller that handles the params
and passes them to one action). i would say there could be various
actions on one form. you can have several submit-buttons each considered
as a separate action. so the action to be performed should be determined
by the value of the submit-button.

the other thing i would expect is a 1-to-n relation between (what i
refere to as controller) a controller that handles form-data and views.
so the process would be:
1. user sends data to controller
2. controller sets up form-bean and tells the form-bean to validate it self
3. controller desides which action is to be performed behalf of the
pressed submit-button
4. action returns or fails whith an exception
5.1. on success tell form-bean to reload data and pass controll to the
appropriate view
5.2. on failure don't reload form and pass controll to the appropriate
view (to be descided on the exception)
6. view sends new content

the point i came to this suggestion is, i have to deal with barrier-free
internet (eg lynx-compatible sites). shure you can change the location
the form is sent to by using JavaScript but not so in lynx.

so am i completely wrong with my point of view? i would luv to know.
DeeasS

--
Sind Sie auch schon drin??
Wir bieten L�sungen rund ums Internet ...

Daniel Steudel
@-traction GbR - Informations- und Kommunikationssysteme

www.attraction.de

Leiterweg 43
71254 Ditzingen

Telefon (07156) 959202
Fax (07156) 959201
Mobil (0160) 7 774 271




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



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

Reply via email to