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);


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


OAF :Formatting DateTime Fields

Use the following code to format DateTime feilds in OAF OAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate"...