4 Replies Latest reply on May 22, 2007 10:36 AM by armita

    suggestion box

    armita

      I have a suggestion box in my page which looks like :

       <s:decorate id="destination" template="layout/edit.xhtml">
       <ui:define name="label">Destination:</ui:define>
      
       <h:inputText id="destinationText"
       value="#{quotesHome.locationsHomeDestination.instance}" required="true" converter="#{locationConverter}">
      
       <a:support event="onblur" reRender="destination"/>
       </h:inputText>
       <rich:suggestionbox for="destinationText" suggestionAction="#{quotesHome.locations}" var="location">
       <h:column>
       <h:outputText value="#{location}"/>
       </h:column>
       </rich:suggestionbox>
      
       </s:decorate>
      

      The first time I works great on the page, but when you try it for a second time, it does not send any request to the server!?

        • 1. Re: suggestion box
          armita

          And interestingly, if I repeat the same code for another inputText in the same page it does not work for this second one.

          <h:inputText id="destinationText"
           value="#{quotesHome.locationsHomeDestination.instance}" required="true" converter="#{locationConverter}">
          
           <a:support event="onblur" reRender="destination"/>
           </h:inputText>
           <rich:suggestionbox id = "suggest1" for="destinationText" suggestionAction="#{quotesHome.locations}" var="location">
           <h:column>
           <h:outputText value="#{location}"/>
           </h:column>
           </rich:suggestionbox>
           </s:decorate>
           <s:decorate id="departure" template="layout/edit.xhtml">
           <ui:define name="label">Departure:</ui:define>
          
           <h:inputText id="departureText"
           value="#{quotesHome.locationsHomeDeparture.instance}" required="true" converter="#{locationConverter}">
          
           </h:inputText>
           <rich:suggestionbox id="suggest2" for="departureText" suggestionAction="#{quotesHome.locations}" var="location">
           <h:column>
           <h:outputText value="#{location}"/>
           </h:column>
           </rich:suggestionbox>
           </s:decorate>
          

          "suggest1" works fine( just one time!) and suggest2 does not work at all

          • 2. Re: suggestion box
            armita

            I found the source of the problem
            In:

             <s:decorate id="destination" template="layout/edit.xhtml">
             <ui:define name="label">Destination:</ui:define>
            
             <h:inputText id="destinationText"
             value="#{quotesHome.locationsHomeDestination.instance}" required="true" converter="#{locationConverter}">
            
             <a:support event="onblur" reRender="destination"/>
             </h:inputText>
             <rich:suggestionbox id = "suggest1" for="destinationText" suggestionAction="#{quotesHome.locations}" var="location">
             <h:column>
             <h:outputText value="#{location}"/>
             </h:column>
             </rich:suggestionbox>
             </s:decorate>
            


            Seems the


             <a:support event="onblur" reRender="destination"/>
            

            causes the problem. And if I remove this everything works great. Is this a bug or I miss something here?


            • 3. Re: suggestion box
              ilya_shaikovsky

              what version did you use. For me support on onblur - didn't break suggestion work.

              • 4. Re: suggestion box
                armita

                I am not sure which version is it, I am using out of the box seam 1.2.1GA which ships with rich faces. I will check the version when I am back home