This content has been marked as final.
Show 1 reply
-
1. Re: How to show FacesMessage by JavaScript ?
nbelaevski May 19, 2010 4:51 AM (in response to marioosh.net)Hi,
In this line: "context.addMessage(FacesMessage.FACES_MESSAGES, message);" instead of passing FacesMessage.FACES_MESSAGES you should pass clientId of a4j:commandLink (check method JavaDoc for more).
There is "oncomplete" attribute that contains JS code. This code is executed after Ajax request completion, so you can add the code that checks messages in FacesContext and show alerts for them.