使用视图范围 bean 时,为什么 ICEfaces 在页面卸载时发送 dispose-window 请求?

发布于 2024-12-18 05:11:03 字数 2168 浏览 0 评论 0原文

在我们的应用程序中,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>

要重现,请使用上面的代码执行以下操作:

  1. 打开 firebug 的 net 选项卡并激活持久选项
  2. ,单击 doSomething-Button
  3. 单击“链接到同一页面”
  4. => 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:

  1. open firebug's net tab and activate persist option
  2. click doSomething-Button
  3. click "link to same page"
  4. => 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心碎的声音 2024-12-25 05:11:03

请参阅上面的评论和解决方法。这是冰面上的一个错误。

See comments and workaround above. It's a bug in icefaces.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文