Several times, we might have the need to refresh the page programatically. Every page is internally given an ID and can be refreshed by this ID as follows in the backing bean.
Refresh a page programmatically.
String refreshPage = fctx.getViewRoot().getViewId();
ViewHandler vh = fctx.getApplication().getViewHandler();
UIViewRoot UVi = vh.createView(fctx,refreshPage);
UVi.setViewId(refreshPage);
fctx.setViewRoot(UVi);