0% found this document useful (0 votes)
285 views1 page

OAF Number Formatting Guide

There are two ways to format numbers in OAF without using format expressions like in ADF. The first is to use a Formatter class to specify the number format and assign it as an attribute to the numeric field. The second is to set the CURRENCY_CODE attribute on a currency field to format it using the default currency format.

Uploaded by

rajak_khan786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
285 views1 page

OAF Number Formatting Guide

There are two ways to format numbers in OAF without using format expressions like in ADF. The first is to use a Formatter class to specify the number format and assign it as an attribute to the numeric field. The second is to set the CURRENCY_CODE attribute on a currency field to format it using the default currency format.

Uploaded by

rajak_khan786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like