aspose file tools*
The moose likes JSF and the fly likes JSF Beginner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Beginner" Watch "JSF Beginner" New topic
Author

JSF Beginner

Kiran Srinivasa
Greenhorn

Joined: Jul 07, 2009
Posts: 12
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

Joined: Jul 10, 2002
Posts: 214

How about using an array of Employee in the session variable.


SCJP, SCWCD
Kiran Srinivasa
Greenhorn

Joined: Jul 07, 2009
Posts: 12
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

Joined: Jul 14, 2009
Posts: 2
If you use Trinidad, you can achieve this using page flow scope.
Kiran Srinivasa
Greenhorn

Joined: Jul 07, 2009
Posts: 12
Thanks Gopi, is there any equivalent of pageScope in JBoss RichFaces?

Regards
Kiran
Kiran Srinivasa
Greenhorn

Joined: Jul 07, 2009
Posts: 12
Sorry for the typo, my previous question was, is there any equivalent of pageFlowScope in JBoss RichFaces.

Regards
Kiran
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Beginner