This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Data Retention in JSPs

 
Ranch Hand
Posts: 37
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I need to retain the values from a form. In the example below given in Data Retention example I can save an array of objects in the form by just using this code (my JSP code is definitely better designed than this, I'm using tags but the point is to show how the object gets copied from the form to the javabean class:





It all works fine when the property of the object is a string, but I have a List as a property, so my object would look like:


instead of


How can i modify the javabean code above to make it work for array properties or if I have to add the code the the beanObj element that also works but nothing's work so far.

Thanks!
 
Bartender
Posts: 9586
13
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the comments for that article. Not something you want to emulate.
 
Klament J. Kruoghst
Ranch Hand
Posts: 37
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Joe Ess wrote:Read the comments for that article. Not something you want to emulate.



Yes I know hence my comment:

... I can save an array of objects in the form by just using this code (my JSP code is definitely better designed than this, I'm using tags but the point is to show how the object gets copied from the form to the javabean class



The point of all this is not the way they're displaying the JSP, I'm using proper tags, the code i'm using and i need to change is the actual java code in the javabean, that as far as i know is the only way to save the object to the form in struts, and that's the one i need to save in an array.

Cheers,
 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!