OAF :Formatting DateTime Fields

Use the following code to format DateTime feilds in OAF

OAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate");

OANLSServices nls = pageContext.getOANLSServices();
oracle.cabo.ui.validate.Formatter formatter =
    new OADateValidater(nls.getUserJavaDateFormat() + " HH:mm",
                        nls.getUserRRRRJavaDateFormat() + " HH:mm");
departureDateBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);


Popular posts from this blog

ADF : Get Current Logged User Name

OAF : Get Current Row in Table

ADF : Working with ViewCriteria