• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tapestry JavaBeans across pages

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a page where I have setEmployee(Employee emp) where Employee is a JavaBean. What I need to do is make Employee available to all subsequent pages. When I setEmployee on my page in my Java code, does it go in the HttpSession, HttpRequest, Context, etc?

How can I access that Employee object on another page?

Thanks.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Gregg, you can store Employee object in the application-wide Visit Object. Refer to Section 2.2.4 of the book for details.
[ May 28, 2004: Message edited by: Looluo Zhu ]
 
author
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, you can make the Employee object persistent on the first page, and the other pages can get that page from the IRequestCycle to obtain the prooperty. Generally, though, it is easier to store the object (the Employee) as the Visit object ... or better yet, as a property of the Visti object (since you'll have a few cases like this in your application).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic