But if I need it to be a DynaActionForm subclass, then I'd just use
LazyValidatorForm or its subclass, right?  In which case, wouldn't I
have to worry about it being properly initialized, as indicated in
http://struts.apache.org/userGuide/building_controller.html#dyna_action_form_classes
?

Someone asked about combining FormDef and LazyBeans to come up with a
form containing indexed properties.  FormDef works with
DynaActionForms.  If I have an array or list of dyna forms, I can use
FormDef with each element.  The problem is coming up with a lazy,
non-session-scope implementation.  I came up with the code snippet at
https://formdef.dev.java.net/servlets/ReadMsg?list=users&msgNo=12
because I assumed that in order to create a proper ActionForm, it
needed to go through FormBeanConfig's createActionForm.  Are lazy dyna
forms exempt from this requirement?


On Fri, 1 Oct 2004 21:14:25 +0100, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> It could, although there is no need for it to be an ActionForm - could just
> be a LazyDynaBean. Having said that, you would probably want to override the
> default "indexed" type to be a LazyDynaBean array rather than ArrayList as
> LazyDynaBean doesn't populate Lists, but it does Arrays.
> 
> public class CustomLazyBean extends LazyDynaBean {
> 
>    public CustomLazyBean() {
>         super();
>    }
> 
>   protected Object defaultIndexedProperty(String name) {
>        return new CustomLazyBean[0];
>    }
> 
> }
> 
> <form-bean name="skillForm"
>     type="org.apache.struts.validator.LazyValidatorForm>
>         <form-property name="skills"
>             type="myPackage.CustomLazyBean[]"/>
> </form-bean>
> 
> 
> Niall
> 
> 
> 
> ----- Original Message -----
> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, October 01, 2004 8:07 PM
> Subject: Re: Indexed Properties and Lazy List behaviour
> 
> > In 2.3 of StrutsCatalogLazyList, it uses a Lazy*Form flavor to hold an
> > indexed property.  Can the indexed property itself an array or list of
> > Lazy*Form objects?
> >
> > <form-bean name="skillForm"
> >     type="org.apache.struts.validator.LazyValidatorForm>
> >         <form-property name="skills"
> >             type="org.apache.struts.validator.LazyValidatorForm"/>
> > </form-bean>
> >
> >
> > On Fri, 1 Oct 2004 00:17:40 +0100, Niall Pemberton
> > <[EMAIL PROTECTED]> wrote:
> > > I've set up this wiki page showing how to use indexed properties and
> > > implement lazy list behaviour in an ActionForm.
> > >
> > > http://wiki.apache.org/struts/StrutsCatalogLazyList
> > >
> > > There are three possible solutions to lazy list beviour on that page -
> but
> > > since I'm only using LazyDynaBeans myself, I would appreciate if anyone
> > > using either the Commons Collections LazyList or hand cranked lazy lists
> > > would take a look to see if what I posted looks right.
> > >
> > > Niall
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> >
> >
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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