Using JSF with multiple tabs in one browser [duplicate]

*爱你&永不变心* 提交于 2019-11-29 04:22:05

In JSF 2.0 you can use the view scope for this, annotable using @ViewScoped. You can even define custom scopes.

See also:

I don't think View Scope will work here. The question is specifically about a multi-browser tab scenario and my understanding with View Scope is that there is still one separate state per view (not per tab). In other words if you have the same page open in multiple browser tabs then you are at risk for sharing state.

This is mentioned here: http://www.java.net/node/692109

It seems like there are only two solutions to this problem: 1. CDI/Seam conversation scope (or something like it where an extra id is added to requests) or 2. Just stick to request scope / stateless app.

MyFaces orchestra has a way of dealing with multiple tabs/windows (using the conversationContext get parameter).

Use Seam with the JSF framework you want.

The conversation context is perfect for using different tab. Just start a new conversation on each tab. :)

Take a look at the Booking demo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!