This content has been marked as final.
Show 5 replies
-
1. Re: FacesMessage with two <h:message>
amitev Apr 13, 2010 5:03 PM (in response to daniele4)<h:message> or <h:messages> ?
-
2. Re: FacesMessage with two <h:message>
daniele4 Apr 13, 2010 5:52 PM (in response to daniele4)<h:message> !! -
3. Re: FacesMessage with two <h:message>
amitev Apr 14, 2010 2:18 PM (in response to daniele4)You can pass the clientId of the jsf component you would like to attach the message to. Like this:
facesContext.addMessage("myForm:inputFiled",facesMessage);
-
4. Re: FacesMessage with two <h:message>
daniele4 Apr 15, 2010 10:40 AM (in response to daniele4)Hi,
it seem doesn't work.
This is my code
<h:form id="myform">
<h:inputSecret value="asdf" id="newPassword1" />
<h:message class="error" for="newPassword1" id="newPassword1Error" />
<a:commandButton value="test" action="#{test.showMessage}"/>
</h:form>
public void showMessage(){
javax.faces.context.FacesContext.getCurrentInstance().addMessage("myForm:newPassword1", new FacesMessage("error"));
}
any suggestion?
thanks -
5. Re: FacesMessage with two <h:message>
daniele4 Apr 15, 2010 12:06 PM (in response to daniele4)It's work!! I made a mistake with word myForm...
thanks Adrian