I would like to display all possible values in a SuggestBox.
Naturally, I have the following code (settingName is a SuggestBox)
settingName.getTextBox().addFocusHandler(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
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With