struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject Using commons-collections lazylist for nested actionforms
Date Mon, 01 Mar 2004 09:36:41 GMT
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message