GWT中的SuggestBox不能用键盘滚动

时间:2015-09-08 06:42:43

标签: gwt

我在我的项目中使用gwt-suggestbox(GWT 2.4)。它包含大量的记录,所以我把滚动放在这里。

当我用鼠标滚动显示所有记录时,但是当我使用键盘向下/向上键时,记录不显示,键盘滚动不起作用。

SuggestBox suggestbox = new SuggestBox(getCountries());

MultiWordSuggestOracle getCountries() {

    MultiWordSuggestOracle countries = new MultiWordSuggestOracle();

    countries.add("Haiti");
    countries.add("Heard Island And Mcdonald Islands");
    countries.add("Holy See");
    countries.add("Honduras");
    countries.add("Hong Kong");
    countries.add("Hungary");
    countries.add("Iceland");
    countries.add("India");
    countries.add("Indonesia");
    countries.add("Iran");
    countries.add("Iraq");
    countries.add("Ireland");
    countries.add("Israel");
    countries.add("Italy");
    countries.add("Jamaica");
    countries.add("Japan");
    countries.add("Jordan");
    countries.add("Kazakstan");
    countries.add("Kenya");
    countries.add("Kiribati");
    countries.add("South Korea");
    countries.add("North Korea");
    countries.add("Kuwait");
    countries.add("Laos");
    countries.add("Latvia");
    countries.add("Lebanon");
    countries.add("Lesotho");
    countries.add("Liberia");
    countries.add("Libyan Arab Jamahiriya");
    countries.add("Liechtenstein");
    countries.add("Lithuania");
    countries.add("Luxembourg");
    countries.add("Macau");
    countries.add("Madagascar");
    countries.add("Malawi");
    countries.add("Malaysia");
    countries.add("Maldives");
    countries.add("Mali");
    countries.add("Malta");
    countries.add("Marshall Islands");
    countries.add("Martinique");
    countries.add("Mauritania");
    countries.add("Mauritius");
    countries.add("Mayotte");
    countries.add("Mexico");
    countries.add("Micronesia");
    countries.add("Moldova");
    countries.add("Monaco");
    countries.add("Mongolia");
    countries.add("Montserrat");

    countries.add("Thailand");
    countries.add("Togo");
    countries.add("Tokelau");
    countries.add("Tonga");
    countries.add("Trinidad And Tobago");
    countries.add("Tunisia");
    countries.add("Turkey");
    countries.add("Turkmenistan");
    countries.add("Turks And Caicos Islands");
    countries.add("Tuvalu");
    countries.add("Ukraine");
    countries.add("United Arab Emirates");
    countries.add("United Kingdom");
    countries.add("United States Minor Outlying Islands");
    countries.add("United States");
    countries.add("Uruguay");
    countries.add("Uzbekistan");
    countries.add("Vanuatu");
    countries.add("Venezuela");
    countries.add("Viet Nam");
    countries.add("Virgin Islands, British");
    countries.add("Virgin Islands, U.S.");
    countries.add("Wallis And Futuna");
    countries.add("Western Sahara");
    countries.add("Yemen");
    countries.add("Yugoslavia");
    countries.add("Zambia");
    countries.add("Zimbabwe");
    return countries;
}
}

0 个答案:

没有答案