Cheers mate!
Exactly what I was hoping to hear :-)

-----Original Message-----
From: Arron Bates [mailto:[EMAIL PROTECTED]
Sent: Monday, 1 March 2004 17:57
To: [EMAIL PROTECTED]
Subject: Re: Using commons-collections lazylist for nested actionforms



No worries about the order of the submit.
The nulls are just place holders. Whenever an oject for a given index is
requested, it looks to see if it's out of bounds, or null. In both those
cases
it will use the factory to make an object and populate the index. The other
scenario is that there's already a non-null object for that index, in which
case it's already solved.

Cheers,

Arron.




> Im about to have a go using the lazylist stuff in commons-
> collections 2.1 to implement some nested actionforms stuff
> (previously Ive always been initialising the lists the hard way in
> my reset method!).
>
>
http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect
> ions/ListUtils.html
>
> Anyhow , one thing that struck me from reading the description was
> the bit about...
>
> <snip>
> Object obj = lazy.get(3);
> After the above code is executed, obj will contain a new Date instance.
> Furthermore, that Date instance is the fourth element in the list.
> The first, second, and third element are all set to null. </snip>
>
> ...how the elements before the requested one are initialised to
> null. Does this mean that Im going to encounter problems if the
> browser decides to submit my parameters in the wrong order for example:
>
> foo[2].bob=blah
> foo[2].baz=yada
> foo[1].bob=blah
> foo[1].baz=yada
> foo[0].bob=blah
> foo[0].baz=yada
>
> My html will have the items in the correct order - but does that
necessarily
> mean the browser has to submit in that order - and if it doesnt will
> my use of the lazylist stuff be broken?
>
> (And I do already know that some broswers submit fields in different
> orders if you happen to have been messing round with that html on
> the clientside using javascript to modify the dom synamically though
> I wont be doing that here)
>
> ---------------------------------------------------------------------
> 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