How to raise bundle exception in OAF

If we want to display multiple error messages in OAF page. We need to use the code as follows:

arraylist errmsg = new ArrayList();

if(pageContext.getParameter(“Type”).equals(“”))
{
errMsg.add(new OAException(“Type cannot be empty”,OAException.ERROR));
}

if(pageContext.getParameter(“AddressLine1”).equals(“”))
{
errMsg.add(new OAException(“Address line1 cannot be empty”,OAException.ERROR));
}

if (errMsg.size()> 0)
{
OAException.raiseBundledOAException(errMsg);
}

Recent Posts