Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added jQuery link

...

Since version 6.0 Wicket uses JQuery jQuery as a backing library for its Ajax functionality.

...

The previous implementations of wicket-ajax.js and wicket-event.js were home baked solutions that worked well but also suffered from the differences in the browsers. Often users complained that some functionality doesn't work on particular version of particular browser. That's why the Wicket team chose to use JQuery jQuery to deal with browser inconsistencies and leave us to do our business logic.

...

The new implementations (wicket-ajax-jquery.js and wicket-event-jquery.js) use JQuery jQuery internally but expose Wicket.** API similar to the previous version.

All Java components and behaviors should still use the Wicket.** API. This way if someday we decide to not use JQuery jQuery anymore we will have less work to do. Also if a user uses Dojo/YUI/ExtJS/... and prefer to not have JQuery jQuery in her application then she will be able to provide wicket-ajax-xyz.js implementation and replace the default one.

...

Since Wicket 6.0 ResourceReference can have dependencies and it is recommended to properly define the dependency chain between this classes.
See the code of org.apache.wicket.ajax.WicketAjaxJQueryResourceReference to see how the default JQuery jQuery based implementation does that.

If the user application needs to upgrade/downgrade to new/old version of JQuery jQuery then just the first line above is needed:

...

If the user application needs to use Dojo instead of JQuery jQuery then it has provide JavaScriptResourceReferences for wicket-event-dojo.js and wicket-ajax-dojo.js (e.g. DojoWicketEventReference and DojoWicketAjaxReference). Those references should define dependency to DojoReference (a reference that delivers dojo.js). Wicket uses IJavaScriptLibrarySettings#getWicketAjaxReference() and all its transitive dependencies for its JavaScript needs.

...