Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Nesting problems.  RSS feed

Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!