Two changes will be needed: ..... Collection<Suggestion> defaults = new ArrayList<Suggestion>(); ..... ..... defaults.add(new MultiWordSuggestOracle.MultiWordSuggestion("Something", ht)); .....
On 1/11/10, Amos Sam <amos...@gmail.com> wrote: > I've been searching for solution for my problem, but i'm unable to > find it. > > I have SuggestBox and MultiWordSuggestOracle. I populate oracle with > suggestions on page's load time (not that many of them). > Now, i would like to format suggestion popup, so it display's some KEY > values on the left and VALUE on the right side: > ______________ > KEY | VALUE > ------------------------- > Something 1 > Somewhere 2 > ....... .. > > If I create default suggestions, and I set it to oracle by > > <code> > .... > public static MultiWordSuggestOracle oracle = new > MultiWordSuggestOracle(); > public static SuggestBox sb_suggestBox = new SuggestBox(oracle); > > Collection<String> defaults = new ArrayList<String>(); > String ht = "<span style=\"display: block; position: absolute; text- > align:left\">Something</span><span style=\"display: block; width: > 100%; position: relative; text-align:right\">1</span> "; > defaults.add(ht); > oracle.setDefaultSuggestionsFromText(defaults); > .... > </code> > > And if I do suggestBox.showSuggestionList(); it shows me correctly > what I want. > but as soon as I type in a letter, it shows complete HTML code, and > select whatever it finds in it! > > What I'm doing wrong? > > Thanks >
-- 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-tool...@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.