3 Replies Latest reply on Feb 29, 2008 6:09 AM by Ilya Shaikovsky

    rich suggestionbox on the modalPanel gives issue

    Thiagu Mariappan Novice

      Hi everyone,

      In my page I have two text fields on the model panel, one for username and the second one for country.

      I use the rich:suggestionbox component for country field.

      I use the model panel field validation, if any of the two fields have validation error. I need to prevent the model panel hide also.

      This is my sample coding.

      <rich:modalPanel id="reg" height="500" width="700" >
       <f:facet name="header">
       <h:outputText value="Registration Form" />
       <a:form id="regform" >
      <a:region >
      <a:outputPanel ajaxRendered="true">
      <h:outputLabel for="id">Username *</h:outputLabel>
      <h:inputText id="id" value="#{user.siId}"required="true"/>
      <h:message for="id" id="id1" style="color:red" />
      <h:outputLabel for="country">Country </h:outputLabel>
      <h:inputText value="#{user.country}" id="country" />
      <rich:suggestionbox ajaxSingle="true" id="suggestion" for="country" suggestionAction="#{user.autocomplete}" var="result" fetchValue="#{result.text}" >
      <h:outputText value="#{result.text}" />
      <a:commandButton value="Register" action="#{register.register}" oncomplete="windowclose();"/>
      <script type="text/javascript">
      function windowclose(){
       if (document.getElementById('regform: id1')==null)

      Here I can not use a:outputPanel over the rich:suggestionbox. Because, if I use the suggestionbox it does not work properly.

      In the sample coding above, I get the validation error for the first field whenever I type something in the suggestionbox even if I use ajaxSingle="true" in that component.

      Please help me to resolve this issue.