ADF Basics: Show Faces Message in Oracle ADF

Sharing is Caring

FacesMessage is used to show confirmation, warning, information. In this tutorial, you will see that how to use Faces Message to show any information, warning or any error. Suppose you want to show a confirmation when you save your records, here we use Faces Message.

Managed Bean Code to use Faces Message(Information)-

      FacesMessage Message = new FacesMessage("Record Saved Successfully!");   
      FacesContext fc = FacesContext.getCurrentInstance();   
      fc.addMessage(null, Message);   

To use for Error and Warning just change FacesMessage.SEVERITY_INFO to SEVERITY_ERROR or SEVERITY_WARN.
It will look like this

Faces Message in Oracle ADF

You can change your Message accordingly


Related Posts

An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF

Leave a Reply

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