I use as few ActionForm (and Action) objects as possible. 

One thing to keep in mind is that a form bean is not an object, it's
name we give to an object. In the case of the Struts Validator, you
could give the same ActionForm class several different form bean names,
and validate each one differently.

In terms of custom validations, you can also create a base ActionForm
with all the properties you need, and use a subclass to provide
different validate or reset methods. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


"Domen, Ken" wrote:
> 
> I'm running into a problem.
> 
> I started out with one FormBean.  It's basically a flattened domain object.
> I'm using the Dave W. Validation package and in the validation.xml, you
> define
> that for a particular FormBean you validate certain fields.  Different pages
> need validation on different fields so using only 1 FormBean won't work.
> 
> So do you create a new FormBean for each page that needs different
> validations?
> 
> thanks.
> ken
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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

Reply via email to