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

2 comments:

  1. An overwhelming web journal I visit this blog, it's unfathomably amazing. Unusually, in this present blog's substance made inspiration driving truth and reasonable. The substance of data is enlightening
    Oracle Fusion Financials Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training

    ReplyDelete

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...