If validation fails, the controller forwards to the input property,
which can be an action that populates any "static" properties on the
action form bean. 

Ronald Haring wrote:
> 
> > That's what I do to.
> > Putting initialisation logic (like setting defaults) in the
> > form makes it a
> > very strange object. Partly a Utility for passing data
> > between Forms & Action
> > classes & partly a controller fetching data from the model to make it
> > accessible to the JSP. The second part there is the job of
> > the Action class.
> > Keep Form Beans Clean!
> 
> Ok, but how do you handle generated errors.
> If the validate finds an error in an input field, it will display the form
> again, without going through any action.
> So how can you set the setted variables back again to their states. I
> encountered this when I was using a list with values from a database passed
> on the parameter a user passed in combination with an input form.
> If the validate encountered an error, I got a no collection found.
> I solved this by saving the formbean in the session and if validate
> generated errors I retrieved the formbean from the session again in a temp
> bean and copied the list values from the previous bean back in the new one.
> 
> Gr
> Ronald
> 
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
> 
> ----------------------------------------------------------------------------
> ---------------
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> ----------------------------------------------------------------------------
> ---------------

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

Reply via email to