--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> Not yet ... we'll need to look at how to integrate
> valiation support together with it.

The Validator uses BeanUtils for all property calls to
retrieve values to validate.  And BeanUtils works with
DynaBeans now, right?
   ex:  value = PropertyUtils.getProperty(bean,
property);      

So if I extend DynaActionForm (making 
ValidatorDynaActionForm) and add in a validate method
that calls the Validator Framework shouldn't that
work?  The Validator extension of the DynaActionForm
instance would be the bean variable in the example
above.  Hope that was clear.

David

--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> 
> 
> On Wed, 16 Jan 2002, Matt Raible wrote:
> 
> > Date: Wed, 16 Jan 2002 18:59:49 -0700
> > From: Matt Raible <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List
> <[EMAIL PROTECTED]>,
> >      [EMAIL PROTECTED]
> > To: Struts Developers List
> <[EMAIL PROTECTED]>
> > Subject: RE: Self-Initializing  DynaBean ?
> >
> > I'd love to use this, but I'm worried about losing
> the lovely
> > "ValidatorForm" that my BaseForm extends.  Any way
> I can use the Validator
> > form with the "DynaActionForm"?
> >
> 
> Not yet ... we'll need to look at how to integrate
> valiation support
> together with it.
> 
> > Thanks,
> >
> > Matt
> >
> 
> Craig
> 
> 
> > -----Original Message-----
> > From: Craig R. McClanahan
> [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 16, 2002 5:33 PM
> > To: Struts Developers List
> > Subject: Re: Self-Initializing DynaBean ?
> >
> >
> >
> >
> > On Wed, 16 Jan 2002, Anil Mandava wrote:
> >
> > > Date: Wed, 16 Jan 2002 15:27:25 -0800
> > > From: Anil Mandava <[EMAIL PROTECTED]>
> > > Reply-To: Struts Developers List
> <[EMAIL PROTECTED]>
> > > To: 'Struts Developers List'
> <[EMAIL PROTECTED]>
> > > Subject: Self-Initializing  DynaBean ?
> > >
> > > It would be nice to implement a DynaBean version
> that can self-populate
> > > or self-initialize the properties.
> > >
> > > Say, if it were possible to encode property type
> in the
> > > property name as: "myProp{MyPropClass}"
> > > then the DyanBean's getter/setter can auto add a
> corresponding dyna
> > > property.
> > > This will enable any sub properties of
> MyPropClass to be invoked properly.
> > >
> > > That is all possible, only if we extend the
> property specification to
> > > include {type} part.
> > > Do you feel this is a reasonable thing to do, or
> are there any pitfalls
> > here
> > > ?
> > >
> > > I am more interested in doing this with (Craig's
> soon to come)
> > > DynaActionForm.
> > > My end goal is to have one generic form bean
> (that will work for all
> > > actions).
> > > For such a generic form bean to handle
> multi-level properties
> > > such as "myProp{MyPropClass}.subProp", it has to
> infer and initialize the
> > > first property, so that the setter on the
> subProp can be invoked.
> > >
> > > I am interested in knowing your thoughts and
> opinions on this.
> > > If it does work out and I happen to implement
> it, I will provide a patch.
> > >
> >
> > I just checked in the code for DynaActionForm,
> along with support for it
> > in Struts.  I also added a way to configure the
> initial value for dynamic
> > properties that is used in the reset() method. 
> So, you could preconfigure
> > the logon form's values like this:
> >
> >   <form-bean name="logonForm"
> > type="org.apache.struts.action.DynaActionForm">
> >     <form-property name="username"
> type="java.lang.String" initial="user"/>
> >     <form-property name="password"
> type="java.lang.STring"/>
> >   </form-bean>
> >
> > much the same as you can preinitialize normal
> instance variables with
> > initial values when the bean is created.
> >
> > Does that do what you were looking for?
> >
> > > Thank you all for the great work !
> > > Anil
> > >
> >
> > Craig
> >
> >
> > --
> > 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]>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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

Reply via email to