I'm pretty sure that isn't supported; I wanted to do exactly that recently but, looking through the code, it appears you can't. It seems like it'd be a pretty useful thing to be able to do, though. Maybe you could file an enhancement request in Bugzilla.

L.

fea jabi wrote:
I was under the imporession that something like this should work

<form-bean name="Form1" type="org.apache.struts.action.DynaActionForm" dynamic="true">
        <form-property name="property1" type="java.lang.Integer"/>
        <form-property name="property2" type="java.lang.Integer"/>
</form-bean>

<form-bean name="Form2" type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">
        <form-property name="hrs" type="Form1"/>
       <form-property name="property3" type="java.lang.Integer"/>
......................
...................
....................
</form-bean>

can't we do this?


From: Rick Reumann <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: DynaValidatorForm and nested tags.
Date: Mon, 19 Dec 2005 20:25:54 -0500

On 12/19/05, fea jabi <[EMAIL PROTECTED]> wrote:
>
> Thanks. I sure can see the difference.
>
> can we use a DynaValidatorForm as an attribute in another
> DynaValidatorForm?



I'm guessing you could just simply nest DynaValidatorForms (but I'm sure
you'll want to use 'Lazy' ones otherwise you'll have some problems when the form submits - indexOutOfBoundsExceptions), but I think it might be cleaner
to just nest a LazyDynaBean as a property of your LazyDynaForm. Others on
this List have much more experience working with DynaBeans/Forms than me, so
they might have better suggestions.

More about it here:
http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html

Notice on that page at the end...

<struts-config>

       <form-beans>
           <form-bean name="restrictedForm"
type="org.apache.struts.validator.LazyValidatorForm">
               *<set-property property="restricted" value="true"/>*
<form-property name="orderNumber" type="java.lang.Integer" /> <form-property name="customerName" type="java.lang.String" /> <form-property name="orderValue" type="java.lang.BigDecimal" />
               <form-property name="orderLines"
type="org.apache.commons.beanutils.LazyDynaBean[]" />
           </form-bean>
       </form-beans>
    </struts-config>





--
Rick

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

Reply via email to