Thursday, August 15, 2019

Displaying Exception Messages Based on Condition in OAF

How to create a Exception messages, alert messages, warning messages in OAF pages.

Step 1) Create a page Like Below.



Requirement is when you click on Exception Button , you have to see message as what you enter on the Enter some text field and same like for Alert and Warning Buttons.

So for that you have to create a Controller on main region and write below code in Process form Request.

In process form request will write code when action want to do on the page.

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
  super.processFormRequest(pageContext, webBean);

  if(pageContext.getParameter("item3")!=null)
   {
    String name=pageContext.getParameter("item6");
    throw new OAException(name,OAException.ERROR);
   }
  if(pageContext.getParameter("item4")!=null)
   {
    String name=pageContext.getParameter("item6");
    throw new OAException(name,OAException.CONFIRMATION);
   }
  if(pageContext.getParameter("item5")!=null)
   {
    String name=pageContext.getParameter("item6");
    throw new OAException(name,OAException.WARNING);
   }

}

And Import below Packages in the code.

import oracle.apps.fnd.framework.OAException;







No comments:

Post a Comment

AME (Approval Management Engine)

AME (Approval Management Engine) : AME Stands for Oracle Approval Management Engine. AME is a self service web application that enables...