Wednesday, 1 July 2026

Set Number Format in OAF


In oracle OAF , We can set the specific Number format for any Field. 

For that what we need to get the formatter and the we can apply the Decimal Validater on it. 

Noted : in the below code i hardcode my custom field. you can add your own field of use the parameter for field name. 


 //import oracle.cabo.ui.validate.Formatter; important Class for Formatting
 // Set Number fields Format
    public void setNumberFormatter(OAWebBean webBean) {

        Formatter formatter =
            new OADecimalValidater("###,###,##0.00", "###,###,##0.00");  // Formatter

        OAWebBean FarQuantity1_f = webBean.findChildRecursive("FarQuantity1");
        FarQuantity1_f.setAttributeValue(OAWebBeanConstants.ON_SUBMIT_VALIDATER_ATTR,
                                         formatter);

    }


1 comment:

  1. Hi, Please let us know how to restirct user from entering Negative numbers in a Number/message text input field in OAF

    ReplyDelete

How To: Remove all rows from view object (VO) in OAF & ADF

This is the basic requirement when we are working with oracle OAF. In which we need to removed the all rows from the table. The best use ca...