It's not a good conception that an List can be indexed (an Collection to)
....that's suck...
an ArrayList ok but not a simple List... (a simple List don't use an array
as
the internal structure) but for an iterator it's song ok.

But that's my opinion Java data structure are really strange.

--
Alexandre Jaquet

----- Original Message -----
From: "Brandon Goodin" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 3:50 PM
Subject: RE: Wrapping Collections in LazyList to auto-populate form onSubmit


> That's wierd. I use the LazyList all the time and do not run in to that
> problem. Did you try using jstl to see if the problem is perhaps somewhere
> else.
>
> You will need to import the jstl core taglib and the struts html-el tag
> libs.
>
> <c:forEach items="requestScope.[you form name].bananas" var="bannana"
> varStatus="status">
>     <html:text property="bannans[${status.index}].flavour"/>
> </c:forEach>
>
> Have Fun,
> Brandon Goodin
> Phase Web and Multimedia
> PO Box 85
> Whitefish MT 59937
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
> -----Original Message-----
> From: alexj [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 05, 2003 7:05 AM
> To: Struts Users Mailing List
> Subject: Re: Wrapping Collections in LazyList to auto-populate form
> onSubmit
>
>
> Use Collection instead than List (a list is not indexed)
>
> --
> Alexandre Jaquet
>
> ----- Original Message -----
> From: "William Salvucci" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 05, 2003 2:58 PM
> Subject: Wrapping Collections in LazyList to auto-populate form onSubmit
>
>
> From the BananaBean example, I put the following in a nested:form
>
> <nested:iterate property="bananas">
>     <nested:text property="flavour"/>
> </nested:iterate>
>
> and get this exception:
>
> java.lang.IllegalArgumentException: Property 'bananas' is not indexed
>
>
> In the form I construct the bananas list using
>
> private List bananas = ListUtils.lazyList(new ArrayList(),
>       new Factory()
>       {
>         public Object create() {
>           return new BananaBean();
>         }
>       });
>
> In the display action I populate the list using bananas.add
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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