Icefaces 1.8.2 中的全页面刷新?

发布于 2024-08-11 06:40:09 字数 68 浏览 4 评论 0原文

Icefaces仅刷新页面中发生变化的部分。在我的程序中,我想通过管理 bean 进行全页面刷新。有谁知道该怎么做?谢谢。

Icefaces only refreshes the changed parts in the page. In my program I want to do a full page refresh through the manage bean. Does anyone know how to do that ? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

自由如风 2024-08-18 06:40:09

使用 ICeFaces API 进行页面刷新很容易,例如,您可以在操作或操作侦听器中执行此操作。

PersistentFacesState.redirectTo(uri);

其中“uri”是 URI。这将强制浏览器重定向并刷新整个页面。

Doing a page refresh is easy using the ICeFaces API, you can do it in an action or actionlistener for example.

PersistentFacesState.redirectTo(uri);

Where "uri" is an URI. This will enforce a browser redirect and refresh the whole page.

旧城空念 2024-08-18 06:40:09

重点是:只需触发普通(同步)请求,而不是 ajaxical(异步)请求。不知道如何在 Icefaces 中执行此操作,因为我从未使用过它,但基本的 JSF 实现为您提供了 和用于此的 组件。

To the point: just fire a normal (synchronous) request instead of an ajaxical (asynchronous) request. No idea how to do it in Icefaces as I never used it, but the basic JSF implementation provides you the <h:form>, <h:commandButton> and <h:commandLink> components for that.

对岸观火 2024-08-18 06:40:09

另一种方法是让 JavaScript 刷新页面。有一种使用 ICEfaces 执行 JavaScript 的优雅方法。

FacesContext ctx = FacesContext.getCurrentInstance();
JavascriptContext.addJavascriptCall(ctx, "location.reload(true);");

Another approach would be to let JavaScript refresh the page. There is a elegant way to execute JavaScript with ICEfaces.

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