ADF Basics: Show inline Message in Oracle ADF

Sharing is Caring

When we use any technology sometimes we need to show an alert message or warning or confirmation. In Oracle ADF we use Faces Message same as JSF. In this tutorial, I am showing you that how to implement Inline Message in Oracle ADF using FacesMessage.

Those who are familiar with Oracle ADF can create the basic architecture of MVC.

So follow these steps

  • Create a Fusion Web Application in JDeveloper(IDE)
  • Now in ViewController create new Page.
  • Simply drag a CommandButton from Component Palette to the page
  • and Write this code on button

public void showMessageButton(ActionEvent actionEvent) {
 FacesMessage msg=new FacesMessage("This is an inline FacesMessage");
 FacesContext fctx=FacesContext.getCurrentInstance();
 fctx.addMessage(null, msg);
  • It will work as FacesMessage
  • Now drag a af:messages component in the page from Component Palette
    select af:message from component pallette
  • Select af:messages and go to property inspector and set Inline-true


    Set inline true for af:message
  • Now run your page and click on the button, it will look like this


    Inline Message in Oracle ADF
  • This is how we show inline alert in Oracle ADF

Related Posts

0 thoughts on “ADF Basics: Show inline Message in Oracle ADF”

  1. Hi,

    I tried your approach and it worked fine at very first go. But what intrigues me is i want my Message to be displayed in front o critical error thing and not below CRITICAL Error. Guide me if you have any approach for this/

Leave a Reply

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