2011-09-23 33 views
8

我想在SuggestBox中顯示所有可能的值。如何在SuggestBox中顯示所有可能的值

當然,我有以下代碼(settingName是SuggestBox)

settingName.getTextBox().addFocusHandler(new FocusHandler() { 
    @Override 
    public void onFocus(FocusEvent event) { 
     settingName.showSuggestionList(); 
    } 
    }); 

不幸的是,suggestbox顯示任何內容。當然,settingName與一個oracle中有幾個值相關聯。

我瘋了嗎?

根據文檔:

公共無效showSuggestionList()

Show the current list of suggestions. 

回答

3

當顯示列表時,SuggestBox會要求甲骨文的價值顯現。如果文本框爲空,則將調用requestDefaultSuggestions(默認情況下調用requestSuggestions)。

相關問題