ADF 11g supports two level of messages as component level messages and page level messages.
To show a component level message write the following code in your managed bean method:
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "this is component level message");
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(.getClientId(context), msg);
Also note that you need to add component to your page (anywhere).
To show page level message you need to use following code:
FacesContext context = FacesContext.getCurrentInstance();
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Value entered is invalid");
context.addMessage(null, msg);
1 comment:
Nice Post. This record helped me in my school assignment. Thanks Alot
Post a Comment