struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From struts-...@japache.org
Subject Re: RE: FormBeans ... as an Interface.
Date Tue, 02 Jul 2002 13:53:34 GMT
You state:
> The ActionForm contains a *proposed* 
> state change to the model or one of 
> its beans. As Web developers, it's 
> our job to confirm that the state
> change is reasonable (validate the 
> input) and ~then~ update the model. 

Using a value object would be a standard way of handling this. If the ActionForm were coded
to have a property that references a value object, then you've allowed Struts to populsate
its fields and have still separated the code that applies the new values. (In other words,
your server application will still have a method named something like "setInfo(MyValueObject
vo)" called by our Action classes.) 

This would all be pretty easy, except that as far as I can tell, there is no way to initialize
an ActionForm other than hard-code the creation of the view's ActionForm in the Action.

--
Posted via jApache.org

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message