Friday, July 11, 2014

Using FND_MESSAGE in OAF page

What is a message in Oracle Application?
Oracle Application uses the Message Dictionary to store translatable Error and Warning messages that can be used by any programs written in Forms, Reports, OAF,ADF, or PL/SQL.
These messages mainly provide information about business rule errors, such as missing or incorrect data, and how to resolve them, warn about the consequences of intended actions, inform about the status of an application, pages, or business objects, and indicate that processes and actions are performing or are completed.
Because the messages are stored in Application Object Library FND_MESSAGE_% tables, these types of messages are sometimes referred to as FND messages
Create custom message :
In Application Developer Responsibility, navigate to (N) Application | Messages.
 
It can be also done from OAF page
  • Go to Functional Administrator responsibility – then choose Home.
  •  Choose the Core Services Tab – then the  Messages Sub-Menu.
 
Using Fnd Message on OAF page

Below line can be used to show FND_MESSAGE from oaf page  which is created using Application Developer responsibility.

public class xxcusHelloWorldMainCO extends HelloWorldMainCO {

    public void processFormRequest(OAPageContext pageContext,
                                   OAWebBean webBean) {

     if (pageContext.getParameter("Go") != null) {
         String SelPeriod= pageContext.getParameter("SelPeriod");
         if ((SelPeriod.equals("2011")) {
                   
throw new OAException("XXX", "XXIERP_INVALID_PERIOD", null, OAException.ERROR, null);


        }
        }
}

1 comment: