Oracle JDeveloper 11.1.1.3
ADF Faces Rich Components
ADF Faces Rich Components
Sometimes requirement is to refresh whole jspx page from root . By simple java bean code this can achieve.
public String refreshPage_action() {
FacesContext fctx = FacesContext.getCurrentInstance();
String pageToRefresh = fctx.getViewRoot().getViewId(); //getting View Id of current page
ViewHandler viewHandler = fctx.getApplication().getViewHandler();
UIViewRoot viewRoot = viewHandler.createView(fctx, pageToRefresh); //ViewRoot for current page
viewRoot.setViewId(pageToRefresh);
fctx.setViewRoot(viewRoot); //set the viewroot in facesContext to reload
return null;
}