Re: SuggestBox - return single word suggest
The question is how? Can you please point me to some examples and/or descriptions that explain how to do this? I need some more detailed advice. Thanks. -- Jostein kl. 13:13:53 UTC+2 onsdag 23. oktober 2013 skrev Jostein følgende: Hi, I guess this is quite simple, but I cannot find out how to do it. I have implemented a suggest box as this: MultiWordSuggestOracle oracle = new MultiWordSuggestOracle(); SuggestBox box = new SuggestBox(oracle); The suggestBox is populated with street addresses. Each address contains several word, but I want the suggestbox only show items starting with the the typed letters, and not all items where any of the words starts with the suggest. How can I do this? Thank you for any help. Jostein -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: SuggestBox - return single word suggest
You just have to create a class that implements SuggestOracle and then provide it to the SuggestBox through one of its constructors. The SuggestOracle requires a single method to be implemented. That method gives you access to the request the user has made (query, result limits) and the method provides a callback where you push your suggestion results to once you have calculated them. Because you get a callback you can easily do async requests to the server to calculate suggestions. To push the result to the callback you need to use SuggestOracle.Response and fill this response with a list of suggestions. So your class that represents your suggestion entries needs to implement Suggestion. Its pretty self explanatory once you see the method you need to implement. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: SuggestBox - return single word suggest
You probably have to write your own SuggestBox oracle if multi word matching is not what you want. A custom StreetNameOracle could also ask your server to match the query string right in the database if you want to. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.