6 Replies Latest reply on May 10, 2007 6:26 AM by Ilya Shaikovsky

    RichFaces SuggestionBox cursor problem

    Karl Wyer Newbie

      When using the suggestion box in IE 6.0, the cursor becomes stuck in the field.

      To replicate this, goto the demo:


      Type in 'a'

      Choose a value USING the MOUSE

      Now try to tab out of the field. (or click in another field)

      More often that not you cannot leave this field immediately. You may have to repeat the steps above a few times to see the problem.

      It doesn't seem to be a problem if you use the cursor keys. Works OK in firefox too.

      Any suggestions? (pun intended).

        • 1. Re: RichFaces SuggestionBox cursor problem
          Sergey Smirnov Master

          livedemo still contains example of Richfaces 3.0.0
          I have just checked the latest snapshot. The problem is not reproducible there. Try

          • 2. Re: RichFaces SuggestionBox cursor problem
            Karl Wyer Newbie

            Hi Sergey,

            Thanks for the advice. I've tried the latest snapshot of RichFaces and Ajax4JSF (2007/04/24). However when I try to use the SuggestionBox I get a Javascript error.

            Firebug seems to suggest that line 48 in suggestionbox.js is at fault. The variable options is undefined. Has there been a change in the component definition?

            Any suggestions gratefully received. In the meantime, I'll try a different snapshot, just in case the latest is broken.

            Line 48 is :

            {var update=options.popup||'ac1update';
            if(onsubmit&&onsubmit!='null'){this.onsubmitFunction=new Function(onsubmit).bind(this.input);}

            I'm using the following jsp snippet which worked ok in 3.0.0:

            <a4j:region id="supplierAjax">
             <h:inputText id="supplierCode"
             value="#{viewForecastEDIHandler.supplierCode}" maxlength="6"
             <rich:suggestionbox id="supplierSuggest" for="supplierCode"
             width="330" height="150" var="sc" minChars="2"
             frequency="1" ignoreDupResponses="true" fetchValue="#{sc.supplierCode}"
             <h:outputText value="#{sc.supplierCode}: #{sc.companyName}" />

            • 3. Re: RichFaces SuggestionBox cursor problem
              Karl Wyer Newbie

              The javascript error still appears in the builds from 2007/04/15.

              I tried the latest a4j snapshot with Richfaces 3.0.0., whilst there was no javascript error, the stuck cursor problem is still there.

              • 4. Re: RichFaces SuggestionBox cursor problem
                Karl Wyer Newbie


                "1kaa" wrote:
                ... However when I try to use the SuggestionBox I get a Javascript error...

                Scratch that. I'd overridden the Suggestion Box renderer to fix the old JDK1.5 issue and not removed this code. Sorry.

                As you noted, the cursor problem works fine in the latest code.



                • 5. Re: RichFaces SuggestionBox cursor problem
                  Mircea Pop Newbie


                  I have a question related to suggestionBox:

                  I have 3 input fields: Country, Region and City. What I want is that if I select A country then in the region suggest only the regions for that country to suggest. Same for the City.

                  The problem what I am facing is that on the server side I don't get the value of the previous field.
                  Ex: I select USA in the first field.
                  then on the region field - on the server I don't get USA in the value of the bean.

                  I'm using request beans. Is there a way to tell suggestion to submit also the values already selected?

                  I can't use session beans.


                  • 6. Re: RichFaces SuggestionBox cursor problem
                    Ilya Shaikovsky Master

                    Use ajaxSingle="false" on the suggestionBox component. So all other inputs will be submitted also.