Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to push ArrrayList in ValueStack

 
Khsitiz sharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends
I'm facing a problem in my project where I need to push an ArrayList of DTO's
on ValueStack.
What I want is when user invokes an action say search.action the ArrayList gets populated by DTO's and shown to user. But when I call another action say
update.action the ArrayList becomes null. Both these actions invokes different methods of a class. Moreover I don'nt want to store list in session.

thanks and regards
[ December 11, 2008: Message edited by: Khsitiz sharma ]
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to store the list in session then you need to re-create the list.

This can be done in a prepare() method of an action that implements Preparable, so every action method will have the list populated automatically.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!