开发者

Full page refresh in Icefaces 1.8.2?

开发者 https://www.devze.com 2022-12-10 21:49 出处:网络
Icefaces only refreshes the changed p开发者_运维百科arts 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.Doing a page refr

Icefaces only refreshes the changed p开发者_运维百科arts 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.


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.


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.


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);");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号