File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Nesting problems. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Nesting problems." Watch "Nesting problems." New topic
Author

Nesting problems.

Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
Howdy.

On one of my .jsp pages I have a three level nesting (A city has shopping centers, a shopping center has stores, a store has items; of which I want to allow the user to edit the Quantity shipped).

So, in building this, I have List of MallDTO's, which has a list of ShopDTO's, which has a list of ItemDTO's.

My code looks something like this:


Now, it all displays quite nicely, with all the information I want. The problem is that when I submit I get this error:



I'm not sure what the problem is, or why it doesn't like the code. When I check "view source" it all looks quite normal



Is there something about having Object Lists (I'm using an ActionForm (CityForm)) within forms, or deep nesting that I'm not aware of?

Or is there somekind of mistake I've made somewhere; if so, does anyone have any ideas as to where?

Edit: I got it to work by putting the action mappings into the the Session scope instead of Request. On further reading it looks like this is a problem in older versions of Struts (I would need to use some kind of LazyBean instead of a dynaBean). Unfortunetly, my struts is to old to have this capability (and I can't update as I'm part of a team and we're about 80% done this project).

Don't like having things in the session if I can avoid it, but I guess I can't here.
[ October 07, 2004: Message edited by: Karl Beowulph ]
 
Don't get me started about those stupid light bulbs.
 
subject: Nesting problems.