2 Replies Latest reply on Apr 11, 2007 3:59 PM by przemjaskier

    suggestionbox - retrieving values on focus (without key pres

      Hi.
      I want to realize this with suggestionbox:

      When user put focus on EMPTY or NOT EMPTY
      suggestionbox' input field, "autocomplete" method is triggered on backing bean and values retrieved.

      Currently, only when user enters a char (or chars) into suggestionbox, it retrieves autocomplete suggestions.

      How to get it to work?

      Best regards,
      Przem.

        • 1. Re: suggestionbox - retrieving values on focus (without key

          Could you re-phrase your requirement please.

          • 2. Re: suggestionbox - retrieving values on focus (without key

            Thank you for reply, sure:

            Suggestion box in your demo gets suggestions list only when user enters N letters (actually; 1). If user enters no letters, no suggestions are retrieved.

            I have a situation, when user has no clue at all what's a valid variable here. I want simply to make trip to backing bean and retrieve some default suggestions as soon as:

            1. User put focus on suggestionbox' input text (preferrable solution), without writing anything at this moment
            2. User clicks "?" icon next to suggestionbox' input text field and some default suggestions are retrived.

            In other words, I simply want to trigger retrieval of suggestAction's suggest(Object) list without entering anything into editbox. This triggered action will return a small subset of suggestions that I will modify in the following calls, helping not confuse the user.

            Regards,
            Przem.