3 Replies Latest reply on May 19, 2009 11:21 AM by fabio.fornelli

    rich:message disappear

      Hi, I've got a jsp page that contains input fields that need validation. I use rich:message tag for each field to be validated. On the same page I've got a rich:suggestionbox and every time the suggestion box makes an ajax request or receives a response, all of the validation messages disappear. I've seen similar posts and people are suggested to set limittolist=true in the suggestion box. I tried it, but not only doesn't it work, but also the suggestionbox stops working. It's as if the ajax request is not done. If I remove the limittolist attribute or set it to false, the suggestionbox works fine.

      please find my code below

      the rich:suggestionbox

      
      <h:outputLabel for="country_reg" value="Country of registration" />
      <h:inputText id="country_reg" value="#{vessel.country_registry}" label="country_reg" required="true" style="border:1px solid;border-color:#426CA3"/>
      <rich:suggestionbox for="country_reg" suggestionAction="#{acBean.autocomplete}" var="country" fetchValue="#{country.name}" height="50" width="200" limitToList="true">
       <h:column>
       <h:outputText value="#{country.name}"/>
       </h:column>
       <h:column>
       <h:outputText value="#{country.countryCode}"/>
       </h:column>
      </rich:suggestionbox>
      <rich:message for="country_reg" ajaxRendered="false"/>
      
      


      the input field I validate are coded like this

      <li>
      <h:outputLabel for="owner" value="Owner or charter agent" />
      <h:inputText id="owner" value="#{vessel.owner_name}" label="Owner or charter agent" required="true" />
      <rich:message for="owner" ajaxRendered="false"/>
      </li>
      
      


      thanks for your help

      Fabio

        • 1. Re: rich:message disappear
          nbelaevski

          Hello Fabio,

          I cannot reproduce the issue using the following code:

          <h:inputText value="#{capitalsBean.capital}" id="text" />
           <rich:suggestionbox for="text" limitToList="true"
           suggestionAction="#{capitalsBean.autocomplete}" var="result"
           fetchValue="#{result.name}"
           minChars="1"
           width="#{suggestionBox.width}"
           height="#{suggestionBox.height}">
          
           <h:column>
           <h:graphicImage value="#{result.stateFlag}" />
           </h:column>
           <h:column>
           <h:outputText value="#{result.name}" />
           </h:column>
           <h:column>
           <h:outputText value="#{result.state}" style="font-style:italic" />
           </h:column>
           </rich:suggestionbox>
          and the latest 3.3.1-SNAPSHOT.

          What is your RF version?

          • 2. Re: rich:message disappear

            Hi,

            I use 3.3.0 GA. I'll try and upgrade richfaces lib and I'll let you know

            Thanks

            Fabio

            • 3. Re: rich:message disappear

              The problem disappears using 3.3.1RC2.
              Thanks

              Fabio