06 December, 2016

OAF : Number Format

In OAF, There is not format expression in BC4J like ADF, So you do formatting using controller classes.

There are 2 ways to format numbers in OAF
  
1- Format Numbers
Write this code  in processRequest method

import oracle.cabo.ui.validate.Formatter;

        Formatter formatter =
            new OADecimalValidater("###,###,##0.00", "###,###,##0.00");
        OAWebBean numericBean = webBean.findChildRecursive("<>");
        if (numericBean != null)
            numericBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);


2- Format Number using currency format

Write this code  in processRequest method
        OAWebBean currencyBean = webBean.findChildRecursive("<>");
        if (currencyBean != null)
            currencyBean .setAttributeValue(CURRENCY_CODE, "USD");


Thanks

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...