[Opensource] StateForm interface

Mike Traum mtraum at cirnetwork.org
Thu Mar 6 14:08:39 PST 2003


I don't use the Workflow, only the form stuff. It looks like if you want to
take advantage of the state isolation, you specify the state form in the 3rd
parameter addStatePairing(). So, you would need an ActionForm for every
state. Then, you need another ActionForm containing all of the data in all
of the state forms. You may be able to leave the controller form set to
DefaultForm and not deal with the redundancy - dunno.

The reason I went with ActionForms was exactly the opposite of the state
isolation. I wanted to build a wizard-style app without having to manually
deal with all of the transfer to and from the session object. You simply set
the form to 'session', and it's all there.

Normally, every controller should have an ActionForm defined in the config
file under <form-bean>. Then, the 'name' of the form-bean is used as the
'name' under the <action> definition. But, as I said above, I'm not sure if
this is needed if your using state forms - you may be able to just use
"default" (hopefully).

hth,
mike

-----Original Message-----
From: Roberto [mailto:roberto at hess.com.br]
Sent: Thursday, March 06, 2003 6:30 AM
To: opensource at jcorporate.com
Subject: RE: [Opensource] StateForm interface


Em Qua, 2003-03-05 às 21:25, Mike Traum escreveu:
> I found the fact that StateForm is an empty interface confusing also. In
the
> case of the perform() method, StateForm is really a ControllerForm.
> ControllerForm implements StateForm and extends ActionForm. So, what you
> really want to look at is ActionForms, which are part of Struts. See
>
http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_model.html#act
> ionform for a general description.
> 
> I currently develop using these, so feel free to ask more questions...
> 
> mike
So you don't use per-state forms? The Expresso Workflow and Forms doc
suggests that each state in a controller would have a subset of the
controller form in a particular form, to help isolate states from each
other. So, if a StateForm is a ControllerForm, there's no way to isolate
states at all, right?
And so, for every controller I write, should it have an ActionForm in
the struts-config.xml?

roberto

_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/



More information about the Opensource mailing list