• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Displaying Exception Messages Based on Condition

Let us learn how to create an Exception messages in OAF. This lesson will take us to show that how to create a Exception messages, alert messages, warning mesesages in OAF pages.

  1. First create one page in a project.
  2. Create the Region and two items.

One Item to enter text so take it as “Message Text Input” and another items is “Submit Button”. Hence we already seen in previous chapters how to create Message Text Input item and Submit Button.

  1. Create the controller and write the code in the process Form Request, we are going to write the code in process form request because whenever we click on submit button based on the condition the Message should be displayed.
  2. Here we are creating one Message Text input item and three submit buttons each button will display different messages.The below figure shows the page structure Contains :

    Message Component Layout Region

    —Under it: Message Text Input Item

    : Message Layout Item

    —- under message layout item

    :Submit Button 1 with prompt : Exception

    :Submit Button 2 with prompt : Alert

    :Submit Button 1 with prompt : Warning55

Now run the page and just see the output how it looks, the below figure shows the sample output and if we observe there is no gap between Submit Buttons and Message Text Input Item.


Now to create a space between buttons and items we have one item called “spacer”. Create two items under Message Layout and select Item Style as spacer and in Property Inspector give width as 10.

Click on the spacer item hold it and drag it between the Submit Button items, in Message component Layout region directly we cannot create spacer item so there fore create one message layout hold that item and place between Message Text Input item and Message Layout Item which is created early.

Now under the second message Layout item create one item with Item Style as “spacer” and give height as 10 in Property Inspector.


After creation the page structure looks like the following:


Create the controller under the main region and write the code logic in “process Form Request”.

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)


super.processFormRequest(pageContext, webBean);



String name=pageContext.getParameter(“item6”);

throw new OAException(name,OAException.ERROR);




String name=pageContext.getParameter(“item6”);

throw new OAException(name,OAException.CONFIRMATION);




String name=pageContext.getParameter(“item6”);

throw new OAException(name,OAException.WARNING);



In the above code item3, item4, item5 are the id values of the Submit Button items with prompt Exception, Confirm, Warning. Item6 is the id value of Message Text Input item.

The import package is :

import oracle.apps.fnd.framework.OAException;

run the page and see the output. Give some text in Message Input Text and then click on the button to see the messages displayed on OAF. For example see the following:


Review Date
Reviewed Item
Displaying Exception Messages Based on Condition
Author Rating

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

1 Responses on Displaying Exception Messages Based on Condition"

  1. krishnaprasad says:

    My doubt is , How to print message in particular region of the page? suppose if i have 4 regions i want to display message in 3rd region of the page. how?

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.


Please leave a message and we'll get back to you soon.

I agree to be contacted via e-mail.