I was actually looking for an easy way to do just this (nest Dynas) for 4 hours today..
The easiest hack(at least in my mind a hack) is to write a beanutils Converter to convert from a string to DynaActionFrom.
Then when DynaActionFormClass.newInstance() sets the inital property values have your converter registered, and make sure the inital property in the XML for you nested DynaForm it set to the DynaForm you want to use. Then just implement the converter to do

public Object convert(Class type, Object value){
return DynaActionFormClass.getDynaActionFormClass((String)value).newInstance();

}

I have not tested this yet as I would like a better way but I would call it a decent 'HACK'.

Matt,

On Wed, 5 Feb 2003 15:32:03 -0600 Mike Ash <[EMAIL PROTECTED]> wrote:
Guess its time to look at contributing...geez more coding outside of
work...wife is going to love it

-----Original Message-----
From: J Beginner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:31 PM
To: Struts Users Mailing List
Subject: RE: Lost in beans


Yes, I am back to extending ActionForm and
ValidatorForm.
I hope that nested DynaForms will be supported in the
near future.

--- "Pani, Gourav" <[EMAIL PROTECTED]>
wrote:
You can extend the ValidatorForm and use the
validator framework.

-----Original Message-----
From: Mike Ash [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 4:25 PM
To: 'Struts Users Mailing List'
Subject: RE: Lost in beans


So if your not using dynaforms are you back to
extending actionform? If so
are you not using the validator framework either?

-----Original Message-----
From: J Beginner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:19 PM
To: Struts Users Mailing List
Subject: Re: Lost in beans


This is exactly the same as to what I am trying to
do...no luck so far.
I reverted back to using no DynaForms.

--- Mike Ash <[EMAIL PROTECTED]> wrote:
> Is it possible or is there a better way to do
> something like
> > > <form-beans>
> <form-bean > name="User" > >

type="org.apache.struts.validator.DynaValidatorForm">
> <form-property name="fname"
> type="java.lang.String" />
> <form-property name="lname"
> type="java.lang.String" />
> <form-bean
> name="Addredd"
> >
type="org.apache.struts.validator.DynaValidatorForm"
> >
> <form-property name="street"
> type="java.lang.String" />
> <form-property name="city"
> type="java.lang.String" />
> </form-bean>
> </form-bean>
> <form-beans
> > > Basically looking for a way to nest beans in the
> struts config and use them
> in forms/actions/validation.
> > Thanks
>

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up
now.
http://mailplus.yahoo.com


---------------------------------------------------------------------
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]


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
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