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

Reply via email to