...
Code Block |
---|
public void init() { super.init(); IJavaScriptLibrarySettings jsSettings = getJavaScriptLibrarySettings(); jsSettings.setJQueryReference(new DojoReferenceMyJQueryReference()); jsSettings.setWicketEventReference(new DojoWicketEventReference()); jsSettings.setWicketAjaxReference(new DojoWicketAjaxReference()); } |
...
Code Block |
---|
getJavaScriptLibrarySettings().setJQueryReference(new AnotherVersionOfJQueryReference()); |
If the user application needs to use Dojo instead of 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.
AjaxRequestAttributes
Each Ajax behavior and component can use o.a.w.ajax.attributes.AjaxRequestAttributes to configure how exactly the Ajax call should be executed and how its response should be handled. To do this use:
...