What I want is different different session bean per tab/ window. I know session bean works but I want to create new sessionbean for new tab. Below is reason why I want new session bean.
Suppose on page1, I have list of users. On clicking user, I get details of user in page2.
Now suppose I have two tab. In both pages I have page1.xhtml. On tab1, I clicked on User A. I see details of User A on page2.xhtml Now I come on tab2. On tab2, I clicked on User B. I see details of User B on page2.xhtml Problem is here now. Now I come back to tab1 and refresh the page2.xhtml, I see User B details which is incorrect because earlier I was seeing User A details.
Hence what I want is new sessionbean per new tab/ window.
Is there any way to create new sessionbean per tab/ window? In primefaces or icefaces maybe?
I thought ViewScope was solution, but that was not. Referring BalusC article.
@ViewScoped: a bean in this scope lives as long as you're interacting with the same JSF view in the browser window/tab. It get created upon a HTTP request and get destroyed once you postback to a different view.
With SessionBean, I meant Java/ JSF managed session managed beans and not browser session (history).