Hi there, I'll take a look at it this weekend. I don't get your reference to no session objects.
As far as the problem goes concerning setting against valid indices, my code does that simply enough using a check against ArrayList.size() and the index from the request parameter - if the size is too small, I just add new objects - 3 lines of code. This is all in a for loop, which could recurse - presumably what your commons wrapper does. Guess I'll find out. All the best Adam Arron Bates wrote: > Adam, > > Back to the old "want lists, but no session objects" issue. It's a > common problem these days. It's hard to get the list model working > nicely without "knowing" how big the list is going to be so that > objects can be set against valid indexes. > > The post you speek of in the archives is that I've made a collections > wrapps in the commons project which will wrap collections so that they > can expand by definition when the request comes in with indexed or > mapped properties. > > I'm cutting a short tutorial on it ("how to make funky complex form > models leaving the session object in the closet"), should be finished > in the next few days. It should help a lot of people. Most people end > up with indexed lists, but it's hard to get them working properly on > the back end. It's not just a nested tags thing. > > If you don't mind wading through code and having a go at the > collections wrapper with nothing but javadoc (good javadoc though :)... > > >http://cvs.apache.org/viewcvs/jakarta-commons/collections/src/java/org/apache/commons/collections/LazyCollections.java > > > > > Arron. > > > Adam Hardy wrote: > >> Hi Down Under, >> >> thanks for the reply. I figured that the form properties setting >> thing must be struts, after checking out the JSP spec. JSP does do a >> certain amount of it though, since you can specify a tag in your jsp >> and say parameters="*" - and JSP will match any parameters in the >> request to methods on the tag's bean. >> >> Anyway sorry for sounding like such a dumbass but I've been through >> your tutorials. For the display, I've got the nested tags sussed - >> it's for the save on submit that I'm having problems. It's one of >> those aggravating problems that I can't pin down so it's difficult to >> ask the right questions. >> >> I've actually hacked out some code to stuff the request parameters >> into the bean structure by hand in the form's validate method. >> Obviously I'd like to do it automatically but I had to get the app >> working. To try to sort out what I've done wrong, I'll strip it back >> to the simplest bare bones and take it from there. >> >> What I can't work out from playing with your SavingMonkey demo is how >> struts gets the request parameters into beans inside each other >> inside the formbean. Is it necessary to instantiate the right amount >> of empty beans first? I see SavingMonkey instantiates everything on >> construction. >> >> When saving request parameters to the beans in the formbean, does >> struts call the beans' getter methods to get the ArrayLists and >> beans? I can't see how else it would get access the setter methods on >> the deeper nested beans. >> >> Thanks for your help. I did see a message in the archives here but I >> can't find it again, where you were talking about changes awaiting >> acceptance in CVS - is that just stuff that is now incorporated into >> struts 1.1? I'm using 1.0.2 >> >> All the best, >> Adam > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>