4 Replies Latest reply on Oct 15, 2007 4:45 AM by thedrake

    Action with Suggestion box

    thedrake

      Is there a way to execute an action when the user chooses a word in the suggestion box, or do I have to make a button and read the "inputText" value to use the entry ?

        • 1. Re: Action with Suggestion box
          ilya_shaikovsky

          use a4j:support with event onselect

          • 2. Re: Action with Suggestion box
            thedrake

            That's a good idea but now I need to press enter two times, one time to select the good item, and the second time to launch the event.. It's not very userfriendly :D
            Is there a thing I'm missing ?

            <h:inputText value="#{vehiculectrl.valeur}" id="input"/> <rich:suggestionbox id="suggestionid" for="input"
             minChars="2" fetchValue="#{vehicule.immat}"
             var="vehicule" nothingLabel="Aucun resultat"
             suggestionAction="#{vehiculectrl.suggest}">
             <h:column>
             <h:outputText value="#{vehicule.immat}"/>
             </h:column>
             <a4j:support event="onselect" action="#{vehicule.getInfo}"/>
            </rich:suggestionbox>


            • 3. Re: Action with Suggestion box
              thedrake

              wow sorry for the code...It didnt look like that when i wrote it...

              • 4. Re: Action with Suggestion box
                thedrake

                Hello, I tried the suggestion box with more than 8000 lines, and the website exploded :(
                Even though I created a Class with a string only, to prevent loading every "client", I still can't make it work faster..
                Do you have an optimisation idea ?