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]