在我的表单中,我只有一个没有按钮的字段:
add(new AutoCompleteTextField<String>("hladaneSlovo", settings) {
private static final long serialVersionUID = 1L;
@Override
protected Iterator<String> getChoices(String input) {
return new HladaneSlova().iterator();
}
}.add(new AjaxFormSubmitBehavior(this, "onsubmit") {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
setResponsePage(new VyjimkyPage(parametry));
}
@Override
protected void onError(AjaxRequestTarget target) {
}
}));
问题是当我提交这个表格时(只写单词然后按回车)没有任何反应。怎么了 ?