• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin

Nesting problems.

Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
Won't you be my neighbor? - Fred Rogers. tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic