----- Original Message ----- 
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Sent: Friday, January 06, 2006 8:21 PM


> The interesting thing is, there are some relatively minor tweaks that
> could be done to Struts that would solve a lot of problems.  How about
> creating Actions per-request?

This will be easier to do in Struts 1.3 because rather than having to have a
custom RequestProcessor you simply need to replace the Command that gets the
Action instance with your own version that instantiates a new Action every
time. So rather than using o.a.s.c.c.s.CreateAction create your own
implementation by extending AbstractCreateAction and implement getAction()
method that does this.

>  Not at all a significant enhancement, but
> think of all the things you could then do.  How about a simple flag to
> tell the RP to populate the Action rather than an ActionForm, thereby
> giving Michael his dream of a combined Action and ActionForm?

Again for the same reasons as above this should be straightforward to do in
Struts 1.3 - you could use a property on the ActionMapping to flag this and
replace the PopulateActionForm command with one that populates the Action.
In this case though as well as configuring the chain to use the custom
Command, you will also need to change the sequence of Commands since the
Action is currently created after the ActionForm is populated.

Also, I've only just started reading the WebWork book (on Chpt 5), but it
works in this way already (no separate form and a new instance every time) -
I believe they're moving away from having to have any concrete classes /
interfaces - just have a POJO that gets populated and then configure it to
call a method.

Niall





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

Reply via email to