struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: Defining dyna forms on the fly
Date Fri, 16 Jun 2006 14:13:08 GMT
On 6/16/06, Wendy Smoak <wsmoak@gmail.com> wrote:
> On 6/16/06, Scott Van Wart <scott@indosoft.ca> wrote:
> > I'd like to define the structure of a DynaValidatorForm on the fly
> > instead of through struts-config.xml.  I had a look at FormBeanConfig
> > and DynaActionFormClass (which says "Application developers never need
> > to consult this documentation" :), but I'm not sure where to start.  I'd
> > like to do something like this:
> >
> > <form-bean name="runtimeForm" type="mypkg.RuntimeForm" />
>
> Do you really need to define the structure, or is it sufficient that
> the form accepts whatever property you try to set on it?  I'm thinking
> that one of the "lazy" varieties might work:
>
> <form-bean name="runtimeForm"
> type="org.apache.struts.validator.LazyValidatorForm" />

More info here:
http://struts.apache.org/struts-action/userGuide/building_controller.html#lazy_action_form_classes

Niall

> This will work best if the forms are fairly flat and simple.  If they
> have nested objects, you might have to do more work.
>
> --
> Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message