Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: WICKET-5196

...

This is done to make it more consistent with JavaScript API.

org.apache.wicket.ajax.form.AjaxFormValidatingBehavior doesn't use static methods anymore WICKET-5196

To use AjaxFormValidatingBehavior in Wicket 6.x the application code should do something like:

Code Block
titleMyComponent.java
borderStylesolid

AjaxFormValidatingBehavior.addToAllFormComponents(form, "keydown", Duration.ONE_SECOND);

Due to the usage of static method it wasn't possible to extend this behavior and override for example #updateAjaxAttributes(AjaxRequestAttributes).

The behavior has been reworked a bit to allow this. The new usage is:

Code Block
titleMyComponent.java
borderStylesolid

form.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND);

or

Code Block
titleMyComponent.java
borderStylesolid

formComponent.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND);

in this case the formComponent's owning Form will be used.

Behavior changes

org.apache.wicket.request.Url#getQueryString WICKET-4664

...