wicket-jquery-ui
wicket-jquery-ui copied to clipboard
Change event delayed on NumberTextField
Hello, I'am using com.googlecode.wicket.kendo.ui.form.NumberTextField in Wicket Form. I have AjaxFormSubmitBehavior on that form (catching "change" event). But it isn't fired right after value of field is changed, it is fired after that field loses focus (probably). When I try it with org.apache.wicket.markup.html.form.NumberTextField everything works.
How this should be done properly?
Relevant code snippet:
Form<Void> form;
add(form = new Form<Void>("form"));
form.setOutputMarkupId(true);
form.add(new AjaxFormSubmitBehavior("change")
{
@Override
protected void onSubmit(AjaxRequestTarget target)
{
System.out.println(String.format("CHANGED (%d, %d)", rokOd, rokDo));
}
});
form.add(new NumberTextField<Integer>("inputOd", new PropertyModel<Integer>(this, "rokOd")));
form.add(new NumberTextField<Integer>("inputDo", new PropertyModel<Integer>(this, "rokDo")));
Try with input
event.
Doesn't work at all.
I've removed my previous comment because it was not fully relevant. The best here is to look at usages in the code for IValueChangedListener and OnChangeAjaxBehavior and do implement the same way.
Will try it, but it looks complicated (I'am looking at AjaxSlider and AjaxSliderBehavior).