I understand that the <h:messages> tag outputs validation errors and such, but how can I add a "success" message to there? If all goes well, I want to output a message "Saved successfully" and was wondering how to access the h:messages field from my controller.
Thanks, - Dave
posted 9 years ago
Use FacesContext#addMessage(). Read the API docs for details. You can provide a null client ID to get it displayed in a h:messages component.
posted 8 years ago
To display the messages, there is a post describes and gives a readymade messages component. this component will display the messages in the Java script alert