Menu

How to display a message dialog on the JSF page

ADF By Feb 06, 2013 No Comments
The below code will be used to display a message dialog on
the JSF page.
        FacesContext
facesContext = FacesContext.getCurrentInstance();
        FacesMessage
facesMessage = new FacesMessage(message);

facesMessage.setSeverity(severity);

facesContext.addMessage(null, facesMessage);
Where message is
the message what we want to display on the dialog box and severity is to show the severity of the message. Example for
severity is FacesMessage.SEVERITY_INFO which displays the dialog box as an
information message. Inputs for severity is available in FacesMessage class.

No Comments

Leave a comment

Hi, Welcome here.
JOIN OUR NEWSLETTER
And get notified everytime we publish a new blog post.