在一个浏览器中使用带有多个选项卡的JSF [英] Using JSF with multiple tabs in one browser

查看:106
本文介绍了在一个浏览器中使用带有多个选项卡的JSF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,JSF似乎非常'有状态'。我需要允许人们使用我们的应用程序,在应用程序的不同部分使用多个选项卡执行许多操作。

By default JSF appears to be very 'stateful'. I need to allow people to use our application with multiple tabs doing many things in different parts of the application.

我似乎找不到合适的指令来实现这一点没有经过大量的重新设计。

I can't seem to find decent instruction on making this happen without a whole lot of re-engineering.

我们目前没有使用ICEfaces,但我刚在ICEfaces文档中找到了这个:

We do not currently use ICEfaces, but I just found this in the ICEfaces docs:


6.5.7。 ICEfaces Portlet和并发DOM视图

6.5.7. ICEfaces Portlets and Concurrent DOM Views

ICEfaces提供了一个名为
的并发DOM视图,它控制
,无论ICEfaces框架
是否支持来自同一浏览器的单个
应用程序的多个视图。
在portlet容器中运行时,
ICEfaces需要将单个门户页面上单独的
portlet视为
不同的视图,因此几乎总是
必需(和因此最安全)到
将此参数设置为true。

ICEfaces provides a feature called Concurrent DOM Views that controls whether or not the ICEfaces framework supports multiple views of a single application from the same browser. When running in a portlet container, ICEfaces needs to treat the separate portlets on a single portal page as distinct views so it is almost always necessary (and therefore safest) to have this parameter set to true.

示例6.19。在
WEB-INF / web.xml配置文件中启用ICEfaces
并发DOM视图功能,因此在同一
门户页面上单独的portlet的
被视为不同的
views

Example 6.19. Enabling the ICEfaces Concurrent DOM Views feature in the WEB-INF/web.xml configuration file so that separate portlets on the same portal page are treated as distinct views


com.icesoft.faces.concurrentDOMViews

true

com.icesoft.faces.concurrentDOMViews true

所以,我想知道这个神话般的声音功能是否可能适用于我现有的h:表格,或者它是否只适用于ICEface组件?

So, I want to know whether this fabulous sounding functionality would possibly apply to my existing h:forms or whether it only works with ICEface components?

任何人都可以提供任何好的建议让JSF应用程序在多个标签中工作吗?

Can anyone offer any good advice to get a JSF app working in multiple tabs?

推荐答案

In JSF 2.0你可以使用视图范围来使用 @ViewScoped 。您甚至可以定义自定义范围

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

这篇关于在一个浏览器中使用带有多个选项卡的JSF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆