How to show error message programmatically
ADF Faces uses the standard JSF messaging API. JSF supports a built-in framework for messaging by allowing FacesMessage instances to be added to the FacesContext object using the addMessage(java.lang.String clientId, FacesMessage message) method.
Error Message can be shown inline using af:messages and setting inline property to false.
Code to show error Message :
Following types of error messages can be shown :
Component-Level Message :
These messages are associated to a specific component based on the clientID parameter passed to addMessage method.
Global-Level Message :
These messages are not associated to any component and null is passed for clientID parameter to addMessage method.
Sample app can be download from here. Enjoy !!!