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

    rich:message disappear

    fabio fornelli Newbie

      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:outputText value="#{country.name}"/>
       <h:outputText value="#{country.countryCode}"/>
      <rich:message for="country_reg" ajaxRendered="false"/>

      the input field I validate are coded like this

      <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"/>

      thanks for your help