Wicket AjaxPage added by Martin GrigorovWhat ?Since version 6.0 Wicket uses JQuery as a backing library for its Ajax functionality. Why ?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 to deal with browser inconsistencies and leave us to do our business logic. Design and implementationThe new implementations (wicket-ajax-jquery.js and wicket-event-jquery.js) use 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 anymore we will have less work to do. Also if a user uses Dojo/YUI/ExtJS/... and prefer to not have JQuery in her application then she will be able to provide wicket-ajax-xyz.js implementation and replace the default one. Table with renamed methods from the previous version
Link to jsdocTODO ConfigurationTo replace any of the _javascript_ files the user application may use: MyApplication#init(): public void init() { super.init(); // this is the reference to JQuery getAjaxSettings().setBackingLibraryReference(new _javascript_ResourceReference(....)); // wicket-event.js getAjaxSettings().setWicketEventReference(new _javascript_ResourceReference(....)); // wicket-ajax.js getAjaxSettings().setWicketAjaxReference(new _javascript_ResourceReference(....)); } This way the user application can upgrade/downgrade to new/old version of JQuery or even use YUI as backing library with the respective implementations of wicket-ajax and wicket-event based on YUI.
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Wicket > Wicket Ajax confluence
- [CONF] Apache Wicket > Wicket Ajax confluence
- [CONF] Apache Wicket > Wicket Ajax confluence
- [CONF] Apache Wicket > Wicket Ajax confluence