struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alexj" <>
Subject Re: editable list using nested:iterate and lazyList
Date Wed, 05 Mar 2003 22:16:41 GMT
A collection use an iterator, an collection who use an array for it's
internal structure use an index.

If you use an invalid collection you will got an cannot create iterator
for bean ....

If you use an in-proper Array structure you will got an exception could
not create index.

I got a question why do you use an LazyList ????

Alexandre Jaquet

----- Original Message -----
From: "William Salvucci" <>
To: <>
Sent: Wednesday, March 05, 2003 10:14 PM
Subject: editable list using nested:iterate and lazyList

I posted this already on another thread, but I thought that I would try it
again with some more detail.

I am trying to create an editable list based on some examples using
nested:iterate and ListUtils.lazyList that I have seen offered on this
mailing list.
I have created a simple example, the flow of which is detail action ->
jsp -> control action. The form that is used by all of these looks like:

private List bananas = ListUtils.lazyList(new ArrayList(),
      new Factory()
        public Object create() {
          return new BananaBean();
  public List getBananas() { return bananas; }

The detail action adds BananaBean instances using bananas.add. Inside a
nested:form on the jsp I have

<nested:iterate property="bananas">
    <nested:text property="flavour"/>

and in the control action, I do form.getBananas() and print out the values
to see if they reflect the changes I made on the page.

I can't even successfully display the jsp. I get the following exception:
java.lang.IllegalArgumentException: Property 'bananas' is not indexed

I can't think of a simplier example. Any ideas?

I'm using nested_tags_10.jar with 1.3.1

BTW: LazyList implements Collection so it's indexed, right?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message