struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Salvucci" <William.Salvu...@dn.netl.doe.gov>
Subject editable list using nested:iterate and lazyList
Date Wed, 05 Mar 2003 21:14:47 GMT
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"/>
  </nested:iterate>
 
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?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message