Posts

Showing posts from August, 2013

SuggestBox in GWT - The correct way to create and populate.

Hi everyone, its been a while. Here, in this post, I will be discussing about creating, initializing and populating a suggestbox in gwt. Suggestbox is a text box or text area which displays a pre-configured set of selections that match users input. Suggestbox is similar to an autocomplete search box. Each Suggestbox is associated with a single SuggestOracle. The SuggestOracle is used to provide a set of selections given a specific query string. SuggestBox uses a MultiWordSuggestOracle as its oracle. Following are the steps to create and populate a SuggestBox and declaration of MultiSuggestOracle. 1) First step is to declare MultiSuggestOracle. private   final  MultiWordSuggestOracle oracle =  new  MultiWordSuggestOracle(); 2) Create SuggestBox @UiField  (provided =  true )  SuggestBox sbox =  new  SuggestBox(oracle); The important thing to remember is to add (provided = true). 3) Populating the SuggestBox private   void  populateSuggestBox()      { List