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

OAF : Get Current Row in Table

ADF : Get Current Logged User Name

ADF : Working with ViewCriteria