2 Replies Latest reply on Jul 20, 2007 2:49 PM by mikeeprice

    Displaying a Message for a specific component using id

    mikeeprice

      Still learning and have looked a lot places for answer.

      From some things I have read it looks like I should be able to display a message on a web page for a specific component using the id.

      I saw this somewhere <h:message for="loginName"/> where loginName is the id of an h:inputText component.

      Unfortunately, I can't find an example of any Java code for the action bean to go along with this.

      I keep thinking I should be able to find something like

      facesMessages.add("loginName", "User #{user.loginName} already exists") where loginName is the component id on the web page

      but I can't. Any help would be appreciated.

      I have studied the books, Core Java Server Faces, Beginning JBoss Seam, and JBoss Seam. Also the Java Server Faces and SEAM documentation, searched forums and searched with google. I have also looked at the source code for FacesMessages.java. This stuff is still pretty new to me though.

      Thanks, Mike Price