开发者

How can I display all possible values in a SuggestBox

开发者 https://www.devze.com 2023-04-08 14:03 出处:网络
I would like to display all possible values in a SuggestBox. Naturally, I have the following code (settingName is a SuggestBox)

I would like to display all possible values in a SuggestBox.

Naturally, I have the following code (settingName is a SuggestBox)

settingName.getTextBox().addFocusHand开发者_开发问答ler(new FocusHandler() {
    @Override
    public void onFocus(FocusEvent event) {
      settingName.showSuggestionList();
    }
  });

Unfortunately, the suggestbox displays anything. Of course, the settingName is associated to an oracle with several values inside it.

Am I crazy ?

According to the documentation :

public void showSuggestionList()

Show the current list of suggestions.


You need to set the defaults to show by suggestOracle.setDefaultSuggestionsFromText(..)


When showing the list, the SuggestBox will ask the oracle for values to show. If the text box is empty, then requestDefaultSuggestions will be called (which by default calls requestSuggestions).

0

精彩评论

暂无评论...
验证码 换一张
取 消