Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JSF Beginner

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am new to JSF and facing the following problem.
My application is a HR app in which HR rep's can edit employee info.
I am required to allow the HR rep to edit multiple employees in the same session.
For eg : the HR rep should be allowed to edit employee A's personal details and in the same session do a CTRL-N, open a new browser window and edit employee B's personal details.
I am stuck here since using a bean (say UserBean) in session scope does not work as it overwrites the user data of employee A with that of emp B.
I cannot keep the bean in request scope since the HR rep can move back and forth the edit page and the edit confirmation page.
Please help in this regard. Can i use a list in session scope. Just an idea but could not figure out how to do it.
 
Ranch Hand
Posts: 214
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about using an array of Employee in the session variable.
 
Kiran Srinivasa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or maybe a Map in session would work with the key as the employee id and the value as the employee bean object.
Please let me know if there is any standard mechanism of implementing this feature in JSF.

Regards
Kiran
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you use Trinidad, you can achieve this using page flow scope.
 
Kiran Srinivasa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Gopi, is there any equivalent of pageScope in JBoss RichFaces?

Regards
Kiran
 
Kiran Srinivasa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the typo, my previous question was, is there any equivalent of pageFlowScope in JBoss RichFaces.

Regards
Kiran
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic