27 September, 2012

ADF : Refresh Current Page


You can use the below code to refresh ADF page programatically

FacesContext context = FacesContext.getCurrentInstance()
String viewId = context.getViewRoot().getViewId()

ViewHandler vh = context.getApplication().getViewHandler()
UIViewRoot page = vh.createView(context, viewId);

context.setViewRoot(page);

Import the following classes
 
import javax.faces.application.ViewHandler;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;

Thanks
Recommended Post Slide Out For Blogger