Yep. I was afraid you'd say something like that. I'll see what I can do
about moving to 1.2.6.
On the subject:
Is there a LazyDynaBean implementation that keeps the standard dynabean
behavior on the get() methods? I don't want to touch any of the
createProperty() methods because I want that behavior on the setters.
I'm doing it now, but I'd just assume stay in the "path most traveled". It
looks to be just a matter of any place that forces a return of null to
return an InvalidArgumentException:
Ex:
// Property doesn't exist
if (!isDynaProperty(name)) {
// return null;
throw new IllegalArgumentException("Property '" + name +
"' does not exist in bean.");
Bout right?
Tx again
-Joe
> -----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]