3 Replies Latest reply on Dec 20, 2011 3:51 AM by Christian Peter

    rich:message cannot work in richfaces4.1Final

    Lu Han Newbie


      In our project, we encountered an issue about rich:message component, it's very urgent for us, please help to solve.


      The code:

      <ui:composition xmlns:h="http://java.sun.com/jsf/html"





      <h:inputText id="managementIP" class="normal_width required ipaddress" maxlength="16" value="#{gatekeeperBean.ip}"/>

      <rich:message id="managementIPMsg" for="managementIP" styleClass="error_message"/>



      The issue:


      If we use h:message to replace the rich:message, this issue is solved, but the style is not right.

      Since, there are many rich:message in ou project, we need to know the primary cause.


      Thanks in advance!


      Eric Han

        • 1. Re: rich:message cannot work in richfaces4.1Final
          Brendan Healey Master

          Eric, to trigger validation (and potentially a message) you need to use ajax or have a full form submit

          take place, but neither are shown. It's also not obvious that there are any validation rules to be enforced,

          unless you're using bean validation. Could you clarify these points please?


          The rich:messages component seems to work ok for me in .Final, try this simple ajax example by clicking

          into the input and then click somewhere else:


          <h:inputText required="true" requiredMessage="required...">

             <a4j:ajax event="blur" render="msg1"/>


          <rich:messages id="msg1"/>




          • 2. Re: rich:message cannot work in richfaces4.1Final
            Lu Han Newbie

            Thanks Brendan,

            You are right and the richfaces-showcase is good for me, but it's not talking my puzzle.


            I must to clear the title, it's not the message doesn't return the right value. Instead, it does (when I add a button and did submt the full form). The issue is when the page loads, I got the error in the explorer's console.

            • 3. Re: rich:message cannot work in richfaces4.1Final
              Christian Peter Expert

              Hmmm, are you using any javascript frameworks, custom code or thirdparty clientsite libraries that we should know of? From the screenshot, I assume you are using chrome. Do you get similar results with firefox?


              Please open the chrome develtools (or firebug in firefox), go to the console and enter some javascript and jquery code. Try something like this:



              and the this:



              Do you get any error messages or just the body object printed out?