The following code refreshes the whole page
FacesContext fctx = FacesContext.getCurrentInstance();
String refreshpage = fctx.getViewRoot().getViewId();ViewHandler ViewH = fctx.getApplication().getViewHandler();
UIViewRoot UIV = ViewH.createView(fctx, refreshpage);
UIV.setViewId(refreshpage);
fctx.setViewRoot(UIV);
To refresh a specific component :
AdfFacesContext.getCurrentInstance().addPartialTarget(UIComponent);
No comments:
Post a Comment