Also to this topic, I would like to extend the widget to use a text area and split the entered text by comma (giving suggestions for the text after the last comma). Is there a way to override the query passed to the method that actually creates the search tokens ?
2011/10/13 Andrei Cosmin Fifiiţă <andrei.fifi...@gmail.com> > Waw... it actualy works... I did't read the source code carefully (how > createSuggestion(...) was used) but i uses my own oracle, with an internal > map to remember for each added value its replacement string. > Thank you :) > > > On 6 October 2011 21:17, Aidan O'Kelly <aida...@gmail.com> wrote: > >> You can't add suggestion objects directly, but you can override >> the createSuggestion(String replacementString, String displayString) method. >> >> It will be called with the original string, passed into add(), and a >> displayString, which will have the search query terms highlighted with >> <strong> tags. You can then go ahead and modify the strings, and create and >> return a MultiWordSuggestion object which will be returned to the >> SuggestBox. >> >> >> On Thu, Oct 6, 2011 at 1:14 PM, Ice13ill <andrei.fifi...@gmail.com>wrote: >> >>> I also tried extending SuggestOracle, or Suggestion interface, but i >>> cannot access the methods needed or fields, because they have private >>> or default visibility. Is there something I'm missing ? >>> >>> On Oct 5, 1:29 pm, Ice13ill <andrei.fifi...@gmail.com> wrote: >>> > Hello, I want to create a suggest box with suggestions that have >>> > replacement strings different from display strings >>> > I created acollectionof MultiWordSuggestion(replString, >>> > displayString) but i cannot find how to add them to the SuggestOracle. >>> > I have methods add(string) or addAll(stringCollection), and only >>> > setDefaultSuggestions(suggestionCollection). >>> > the oracle does not have a method addAll(Collection<Suggestion> >>> > suggestions) or add(Suggestions). >>> > >>> > So how do put suggestions with replacement strings different from >>> > display strings? >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Google Web Toolkit" group. >>> To post to this group, send email to google-web-toolkit@googlegroups.com >>> . >>> To unsubscribe from this group, send email to >>> google-web-toolkit+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/google-web-toolkit?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" group. >> To post to this group, send email to google-web-toolkit@googlegroups.com. >> To unsubscribe from this group, send email to >> google-web-toolkit+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.