James Hush
James Hush

Reputation: 464

Creating a GWT SuggestOracle with custom object suggestions

I'm trying to convert a drop down box widget into a SuggestionBox because the current drop down menu has 100+ choices. It seems like you can only add String suggestions to a SuggestOracle though. I need to be able to add a custom object that contains both a description and an ID that matches the record to the database though. Would I have to extend the SuggestOracle class?

Upvotes: 0

Views: 1502

Answers (1)

Shehzad
Shehzad

Reputation: 2940

Yes as i know you can not use pair of values i.e Id and Value. You have to add your strings in suggestion box perhaps you can use different solution other then suggestion box i.e. Create a List of values popup. And add as many fields as you like. display your data in flex table with pagination. update your form with the selected row by using selecition handler. for reference how to use FlexTable and handle events please see able Single Row Click Event

SuggestOracle is the parent class of MultiWordSuggestOracle which you are already yousing.

public class MultiWordSuggestOracle   extends SuggestOracle

see MultiWordSuggestOracle

Upvotes: 1

Related Questions