使用视图范围 bean 时,为什么 ICEfaces 在页面卸载时发送 dispose-window 请求?
在我们的应用程序中,ICEfaces 总是在导航到另一个 JSF 页面之前发送一个 dispose-window 请求。据我所知,当将 org.icefaces.lazyWindowScope 设置为 true 并且当前请求中不涉及窗口范围的 bean 时,这种情况不应该发生。但它发生在每个链接上,并使我们的 UI 响应速度降低。但我们的应用程序中没有任何窗口范围的 bean。
使用视图范围的 bean 时发送处理请求是icefaces中的一个错误吗?可以禁用吗? ViewScope 是在 JSF 中定义的,而不是在 ICEfaces 中定义的,我猜它应该可以在没有此处理请求的情况下工作...
@ManagedBean(name="viewScopeBean")
@ViewScoped
public class ViewScopeBean {
public void doSomething(){
//
}
}
这里是示例 jsf:
<ice:form>
<ice:commandButton value="doSomething" action="#{viewScopeBean.doSomething}"/>
<h:link outcome="index" value="Link to same page"/>
</ice:form>
要重现,请使用上面的代码执行以下操作:
- 打开 firebug 的 net 选项卡并激活持久选项
- ,单击 doSomething-Button
- 单击“链接到同一页面”
- => dispose-window 将在导航之前发送
Dispose 请求参数:
- ice.submit.type=ice.dispose.windowice.window
- =4guthcbue
- javax.faces.ViewState=-8138151632882151449%3A-6709064564386098402
环境:
- ICEfaces-EE 2.0.0.GA
- ICEpush-EE 2.0.0.GA
- Mojarra 2.1.1
- JRockit 1.6.0_22
- WebLogic Server 10.3.4.0
ICEfaces 配置:
- org.icefaces.render.auto:true [默认]
- org.icefaces.autoid:true [默认]
- org.icefaces.aria.enabled : true [默认]
- org.icefaces.blockUIOnSubmit: false [默认]
- org.icefaces.compressDOM: false [默认]
- org.icefaces.compressResources: true [默认]
- org.icefaces.connectionLostRedirectURI: /pages/main.jsf
- org.icefaces.deltaSubmit: false [默认]
- org.icefaces.lazyPush: true [默认]
- org.icefaces.sessionExpiredRedirectURI:/pages/main.jsf
- org.icefaces.standardFormSerialization: false [默认]
- org.icefaces.strictSessionTimeout: false [默认]
- org.icefaces.windowScopeExpiration = 1000 [默认]
- org.icefaces.mandatoryResourceConfiguration: null [默认]
- org.icefaces.uniqueResourceURLs: true [默认]
- org.icefaces.lazyWindowScope: true [默认]
- org.icefaces.disableDefaultErrorPopups: false [默认]
in our application ICEfaces always sends a dispose-window request just before navigating to another JSF Page. as much as i understand this should not happen when having org.icefaces.lazyWindowScope set to true and there is no window-scoped bean involved in current request. but it happens on each link and makes our UI less responsive. but we don't have any window-scoped bean in our application.
is that a bug in icefaces that the dispose request is sent when using view-scoped beans? Is it possible to disable? ViewScope is defined in JSF not in ICEfaces, it should work without this dispose request i guess...
@ManagedBean(name="viewScopeBean")
@ViewScoped
public class ViewScopeBean {
public void doSomething(){
//
}
}
And here the example jsf:
<ice:form>
<ice:commandButton value="doSomething" action="#{viewScopeBean.doSomething}"/>
<h:link outcome="index" value="Link to same page"/>
</ice:form>
To reproduce do the following using the code above:
- open firebug's net tab and activate persist option
- click doSomething-Button
- click "link to same page"
- => dispose-window will be send before navigation
Dispose Request Parameters:
- ice.submit.type=ice.dispose.window
- ice.window=4guthcbue
- javax.faces.ViewState=-8138151632882151449%3A-6709064564386098402
Environment:
- ICEfaces-EE 2.0.0.GA
- ICEpush-EE 2.0.0.GA
- Mojarra 2.1.1
- JRockit 1.6.0_22
- WebLogic Server 10.3.4.0
ICEfaces Configuration:
- org.icefaces.render.auto: true [default]
- org.icefaces.autoid: true [default]
- org.icefaces.aria.enabled: true [default]
- org.icefaces.blockUIOnSubmit: false [default]
- org.icefaces.compressDOM: false [default]
- org.icefaces.compressResources: true [default]
- org.icefaces.connectionLostRedirectURI: /pages/main.jsf
- org.icefaces.deltaSubmit: false [default]
- org.icefaces.lazyPush: true [default]
- org.icefaces.sessionExpiredRedirectURI: /pages/main.jsf
- org.icefaces.standardFormSerialization: false [default]
- org.icefaces.strictSessionTimeout: false [default]
- org.icefaces.windowScopeExpiration = 1000 [default]
- org.icefaces.mandatoryResourceConfiguration: null [default]
- org.icefaces.uniqueResourceURLs: true [default]
- org.icefaces.lazyWindowScope: true [default]
- org.icefaces.disableDefaultErrorPopups: false [default]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅上面的评论和解决方法。这是冰面上的一个错误。
See comments and workaround above. It's a bug in icefaces.