3

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
wonder
  • 31
  • 1
  • 2

3 Answers3

2

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.

Sylar
  • 2,273
  • 2
  • 18
  • 26
1

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

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);");
Zeemee
  • 10,486
  • 14
  • 51
  • 81