> Niall-
> To understand it a little better, does it mean that you do not allow
> ActionServlet to call the validate() method on your GenericActionForm
> since u do your validation in Action instead? Or I missed something!

Yes.

> Also, do you store your validation rules in some type of a XML file or
> similar?

No.

> Further, I would imagine that your Action itself checks with the model for
> any incorrect data in the form if it needs to?

Yes.

> I guess u still derive GenericActionForm from ActionForm

Yes.

> -Rajan
> --- Niall Pemberton <[EMAIL PROTECTED]> wrote:
> > Normally you extend ActionForm and implement getters/setters for each
> > property
> >     e.g.    public String getCustName()
> >             public void setCustName(String name)
> >
> > I have a GenericActionForm which has some standard getters/setters
> >     e.g.    public String getString(String property)
> >             public void setString(String property, String value)
> >
> > GenericActionForm stores these property/value pairs in internal arrays.
> > I
> > have customised ActionServlet to populate these and also customised some
> > of
> > the <html> tags to use the generic getter method if the form is an
> > instance
> > of my GenericActionForm.
> >
> > I don't really know what you mean by "dynamic" validation of properties.
> > When processing a GenericActionForm in the Action you can set up rules
> > for
> > each of the properties to say whether it is required input and what data
> > type it should be. The form has a validate method to check whats been
> > received agaist those rules. Its not dynamic but it is straight forward.
> >
> > If the above checks fail, I can then re-display the form with the values
> > entered. If the checks pass I can then safely populate the data into
> > beans
> > converting from Strings to the correct data types.
> >
> >
> >
> > > -----Original Message-----
> > > From: Levi Cook [mailto:[EMAIL PROTECTED]]
> > > Sent: 13 April 2001 01:05
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Action Forms And Model objects
> > >
> > >
> > > Can you elaborate on what you mean by "dynamic" properties?
> > >
> > > How does this refer to dynamic validation of properties?
> > >
> > > -- Levi
> > >
> > > ----- Original Message -----
> > > From: "Niall Pemberton" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, April 12, 2001 5:58 PM
> > > Subject: RE: Action Forms And Model objects
> > >
> > >
> > > > We are currently building the following:
> > > >
> > > > 1) GenericActionForm with dynamic properties
> > > > 2) Override ActionServlet to populate the GenericActionForm
> > > > 3) Provide type validation & conversion mechanisms in the
> > > GenericActionForm
> > > > 4) Provide mechanism to unload the GenericActionForm into
> > GenericBeans
> > > >
> > > > Our Actions initiate form validation, unload data into
> > > GenericBeans which
> > > > are then passed to our logic layer and I believe this will
> > > allow us to put
> > > > most of our effort into developing the JSP's and logic layer.
> > > >
> > > > > -----Original Message-----
> > > > > From: Natra, Uday [mailto:[EMAIL PROTECTED]]
> > > > > Sent: 12 April 2001 20:17
> > > > > To: '[EMAIL PROTECTED]'
> > > > > Subject: Action Forms And Model objects
> > > > >
> > > > >
> > > > > Hi All,
> > > > > I want to know how you all are desiging the Datacopy from
> > ActionForm
> > > Beans
> > > > > to actual Model objects. In my opinion ActionForms should have
> > only
> > > String
> > > > > DataTypes(Dates are represented as strings). But the Model
> > > objects have
> > > > > actual Data Types since they represent the actual Domain
> > > objects. If it
> > > is
> > > > > the case, we need to write code to copy the contents of the
> > > > > ActionForm into
> > > > > the Domain Object as we cannot use the
> > > > > PropertyUtils.copyProperties(formBean, modelObject);
> > > > >
> > > > > Can anybody comment on this??
> > > > >
> > > > > Thanks,
> > > > > Uday.
> > > > >
> > >
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>

Reply via email to