• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Making a bean collected from a collection in a page, available in a subsequent page

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I've been looking for a way to make a bean I collected in a jsp page (using logic:iterate) available in a linked page (the links a created in the logic:iterate tag). I've tried to use the bean tag "define", I've tried to use paramId, etc. from the "link" html tag but I can't collect the bean in the linked pages.
My jsp code looks like this:

Depending on which link was clicked I would like to make the corresponding user bean available in the next page. Is this possible? And how do I collect the user bean in the clicked page, if it is possible?
TIA,
Greg
 
Sheriff
Posts: 17734
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming:
- the user's login property is unique,
- userDetailForward.do is associated with an ActionForm that has
a field named userlogin
you would change the link tag to:

Note that paramName should be the same value as what you specified for the logic:iterate id attribute.
In the receiving action, you can then use the submitted userLogin value to initialize a bean that you can make available to the next page, although you'd normally just pre-populate the ActionForm to be displayed with whatever detailed data you look up using the submitted userLogin value as the key.
[ April 30, 2004: Message edited by: Junilu Lacar ]
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic