[ 
https://issues.apache.org/jira/browse/WICKET-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-1448.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s: 1.3.3
         Assignee: Igor Vaynberg

i dont know how jquery hooks into the event, but we are already doing 
everything possible from our side. submitlink properly calls form.onsubmit() if 
there is one, and properly treats its return value. call to form.onsubmit() is 
followed by form.submit(). i am not sure what exactly more we can be doing on 
our side. if you have a patch i am all ears.

> if:
>       
> response.renderOnDomReadyJavascript("document.getElementById('"+component.getMarkupId()+"').onsubmit
>  = function(){alert('x');return false;}");
> the alert will show and the form is not submmitted 

that is correct behavior because you return false from onsubmit() the form is 
not submitted. if you return true you will see the alert and the form will be 
submitted.

> SubmitLink bypass jquery submit eventhandler
> --------------------------------------------
>
>                 Key: WICKET-1448
>                 URL: https://issues.apache.org/jira/browse/WICKET-1448
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: xiefei
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.3
>
>
> <form id="wicketForm"><a href="#" wicket:id="submitLink">submit</a></form>
> if:
>         
> response.renderOnDomReadyJavascript("jQuery('#"+component.getMarkupId()+"').submit(function(){alert('x');return
>  false;})");
> the alert will not show when submitLink is clicked, and the form is submitted
> if: 
>         
> response.renderOnDomReadyJavascript("document.getElementById('"+component.getMarkupId()+"').onsubmit
>  = function(){alert('x');return false;}");
> the alert will show and the form is not submmitted

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to