Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Beginner

 
Kiran Srinivasa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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.
 
Edwin Keeton
Ranch Hand
Posts: 214
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Gopi Nimmagadda
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Sorry for the typo, my previous question was, is there any equivalent of pageFlowScope in JBoss RichFaces.

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