Thursday, May 15, 2014

Refresh Page in ADF

The following code refreshes the whole page

  1. 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 :

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

No comments:

Post a Comment