I've defined a suggestbox in UIBinder, and I need to dynamically set its SuggestOracle. All the examples I've seen show that you can only define the suggestoracle at instantiation, but I need to define this AFTER the fact. Is there a way to do this?
Thanks!
Use the method getSuggestOracle
at SuggestBox
to get the oracle. By default, it's from type MultiWordSuggestOracle
. Then, just add the words you want:
MultiWordSuggestOracle orcl = (MultiWordSuggestOracle) suggestBox.getSuggestOracle();
orcl.addAll(words);
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