Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to keep multiple data ?

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, currently stuck on keeping multiple data when user click to fire the action, below is
some template that i use to call mapping by using hidden fields

my action class template


actionflag is actually the hidden value from html page to decide what button user have click in , now my question is
if i want to know what button that user have clicked and put a message to add it into LIST during application runnning, howto
i do that ? above is my sample code , but i suffering to get accumulate elements in list ..meaning as well user have click
10 times, i should send back the list the have 10 messages to the mapping page..anyone can guide me this ?

thank you for helping
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for further information, the buttons clicked are multiple pages
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone have idea ?
 
bhuvan sundar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi nakata

Iam not sure..but i think you can check the retainAll(Object o) method of ArrayList() instead of add()... Do check and let me know..

Hope it works..

Regards
Bhuvana
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic