suggestbox

Creating a GWT SuggestOracle with custom object suggestions

只谈情不闲聊 提交于 2019-12-30 14:46:06
问题 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? 回答1: 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

Adding scroll to GWT SuggestBox

99封情书 提交于 2019-12-12 10:56:01
问题 Does anyone know how to: 1) Add a scroll to the popup created by the SuggestBox? 2) How to customize the looks (CSS) of the SuggestBox efficiently? I want to make above changes without touching the actual implementation as much as possible. Also this solution should support (IE7-IE8, FF, Chrome). Thanks. 回答1: Use Firebug addon for Firefox (or IE/Chrome debugger) to inspect the element you need to modify its style and see if GWT has assigned it a style class name [or read its JavaDoc]. Here in

GWT- Suggestbox listener not working

不羁的心 提交于 2019-12-11 17:54:11
问题 I need to add a handler that fires when a selection is CLICKED which will then validate the value. Current functionality is validating (through textInput on blur) right before the entire value is recorded from the suggestbox, thus not passing validation (when it should). Here is what i tried right below where i implement the suggestbox in the TextInput page: public void onModuleLoad() { SuggestBox box = new SuggestBox(createListOracle(),myTextBox()); box.addSelectionHandler(new

How to hide suggestions in GWT SuggestBox?

家住魔仙堡 提交于 2019-12-08 04:26:47
问题 I am using GWT 2.4. I have a Suggestbox and I have a requirement to hide the suggestion list under certain cases. The context is as below. After user selects a suggestion from suggestion list, I am populating two other text box fields, with values corresponding to the selection. For example, suppose the suggestbox contains user-names, and user selects a user-name from suggestions, then other two fields, say user address and email are populated in two other text boxes. These two fields are

How to hide suggestions in GWT SuggestBox?

亡梦爱人 提交于 2019-12-06 16:39:36
I am using GWT 2.4. I have a Suggestbox and I have a requirement to hide the suggestion list under certain cases. The context is as below. After user selects a suggestion from suggestion list, I am populating two other text box fields, with values corresponding to the selection. For example, suppose the suggestbox contains user-names, and user selects a user-name from suggestions, then other two fields, say user address and email are populated in two other text boxes. These two fields are read only now. Then user clicks on an 'Edit' button. Now the user can edit either user- name ( ie edit in