Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Nesting problems.

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic