Upgrade to wicket 1.5.7 causes button to not be triggered

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Upgrade to wicket 1.5.7 causes button to not be triggered


I have an existing java web application that is built with wicket 1.5.5 and using jquery 1.8.3. Recently I upgraded wicket to 1.5.7 and all of a sudden a file upload button that works with wicket 1.5.5 is not triggering the onSubmit() method which gets a handle on the file.

There's nothing special about the button we are using. We're using the org.apache.wicket.markup.html.form.Button class.

When I remove the references to the jquery javascript files, the Button's onSubmit() method gets triggered fine. The thing is that we have other elements on our page that uses the jquery library, such as a date picker.

After some debugging from firebug, I noticed that the jquery library's line 8434 was being triggered. Out of curiosity, I commented that line out and everything worked fine. I know I know, this is not the best thing to do, so I am not going down this path to fix my issue.

 // Do send the request
 // This may raise an exception which is actually
 // handled in jQuery.ajax (so no try/catch here)
 xhr.send( ( s.hasContent && s.data ) || null );  <-- this was commented out

I am no expert in jquery, so if anybody has any suggestions they are greatly appreciated.

Thank you in advance.