How about a simpler case then....

My real goal is to have DynaForms that are backed my experimental
"semi-lazy-dynabean". 

BeanValidatorForm (while an impressive piece of work IMHO) isn't actually
subclass of a DynaForm (even though it seems like it can be used in almost
the same way). 

The way I see it, the "easiest" way is to implement a FormBeanConfig that
identifies my DynaBean and have all my beans use it? (I can get it to
default by mucking with the ModuleConfig object, right?)

Sorry for asking so many questions on this. I am delving into the innards of
Struts on a level I haven't before, and I think I'm *this* close to fixing
the thing about Struts that I seem to whine about incessantly.

If I have a DynaForm Object backed with my own brand of DynaBean, I'm most
of the way home.

Tx again


> -----Original Message-----
> From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 07, 2005 1:01 PM
> To: Struts Users Mailing List
> Subject: Re: LazyDynaBean question
> 
> If you wanted to have Struts use different flavours of 
> BeanValidatorForm to wrap objects then you would have to 
> create your own custom FormBeanConfig implementation and 
> override the createActionForm() method. Then you need to 
> configure struts to use the custom FormBeanConfig and put in 
> place a mechanism to tell your custom FormBeanConfig how to 
> select the various flavours.
> 
> IMO a much simpler soution is to create your own custom 
> ActionForm by extending BeanValidatorForm (like 
> LazyValidatorForm in 1.2.6)
> 
> public class PathBeanValidatorForm extends BeanValidatorForm {
>     public LazyValidatorForm() {
>         super(new LazyDynaBean());
>         setPathValidation(true);
>     }
> }
> 
> ... and then cofigure it in the usual way.
> 
>  <form-bean name="LazyBean"
>  type="myPackage.PathBeanValidatorForm "/>
> 
> Niall
> 
> ----- Original Message -----
> From: "Joe Hertz" <[EMAIL PROTECTED]>
> Sent: Monday, February 07, 2005 5:37 PM
> 
> 
> > I'm using Struts 1.2.4.
> >
> > If in my struts-config I have something like this:
> >
> > <form-bean name="LazyBean"
> > type="org.apache.commons.beanutils.LazyDynaBean"/>
> >
> > How can I get to the resulting form object to 
> setPathValidation(true)?
> >
> > Is there a way I can tell Struts what particular 
> BeanValidatorFom subclass
> > to be using? Going to 1.2.6 is not an option right now.
> >
> > TIA
> >
> > -Joe
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



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

Reply via email to