private void addMultiValueAutoComplete()
{
/*
* Add the multivalue suggest box
*/
final FancyAutocompleter msb = new FancyAutocompleter(new MultivalueSuggestRESTHelper("TotalSize", "Options", "DisplayName", "Value") {
@Override
public String buildUrl(String q, int indexFrom, int indexTo)
{
return "multivaluesuggestboxexample/colors?q=" + q + "&indexFrom=" + indexFrom + "&indexTo=" + indexTo;
}
}, true);
msb.getFeedback().addStyleName("msg-feedback");
msb.setPageSize(8); //since each value takes up more space, let's cut the size.
String spanId = "WidgetsSuggestBox";
HTMLPanel panel = addToSlidingGrid(msb, spanId, Index.getStrings().mvsp(), STRINGS.MultiVal_html(), BIG);
/*
* so that spellcheck is not done on a selected crayon color of "Screamin' Green"