ads

X

Friday, April 4, 2014

Refresh Page in Oracle ADF by Java Code

Some times we need to refrsh whole page in Oracle ADF, then we can use this managed bean code to refresh whole page in ADF.


  1. protected void refreshPage() {
  2. FacesContext fctx = FacesContext.getCurrentInstance();
  3. String refreshpage = fctx.getViewRoot().getViewId();
  4. ViewHandler ViewH = fctx.getApplication().getViewHandler();
  5. UIViewRoot UIV = ViewH.createView(fctx, refreshpage);
  6. UIV.setViewId(refreshpage);
  7. fctx.setViewRoot(UIV);
  8. }

Partially refresh any UIComponent-


  1. AdfFacesContext.getCurrentInstance().addPartialTarget(UIComponent);