Wednesday, 7 December 2011

formatting Number in 0.00 format

import oracle.cabo.ui.validate.Formatter;

public void formatFields(OAPageContext pageContext, OAWebBean webBean)
{
        OAPageLayoutBean pageBean = (OAPageLayoutBean)pageContext.getPageLayoutBean();
        Formatter formatter =         new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
        OAMessageTextInputBean sbean2 = (OAMessageTextInputBean)pageBean.findIndexedChildRecursive("OverrideAmount");
        sbean2.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
}

1 comment:

  1. Solution does not work on MessageStyledText, keep field as MessageTextInput and change readonly to true, then it will work.

    ReplyDelete