Wicket で、テキスト入力フィールドを AutoComplete にする場合、
Wicket-AJAX より、Wicket - jQuery UI の方が良いかもしれない。
https://code.google.com/p/wicket-jquery-ui/
com.googlecode.wicket.jquery.ui.form.autocomplete.AutoCompleteTextField
を使う場合、、、
AutoCompleteTextField<String> customerName = new AutoCompleteTextField<String>("customerName", new Model<String>()){
@Override
protected List<String> getChoices(String input){
if (Strings.isEmpty(input)){
return Collections.emptyList();
}
// DB から Like 検索してヒットする customername リストを返す。
return logic.getCustomerNames(input);
}
@Override
protected void onSelected(AjaxRequestTarget target){
// 選択した時の処理
}
};
のようにする。