[ 
https://issues.apache.org/jira/browse/WICKET-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155871#comment-13155871
 ] 

Martin Grigorov commented on WICKET-3367:
-----------------------------------------

Here are few real examples of the generated javascript for Links Example:

<script type="text/javascript" id="event-click-c1_link1">
/*<![CDATA[*/
Wicket.Ajax.do({"u":"links?0-1.IBehaviorListener.0-c1~link","e":"click","c":"c1_link1"});
/*]]>*/
</script>

<script type="text/javascript" id="event-click-c2_link2">
/*<![CDATA[*/
Wicket.Ajax.do({"u":"links?0-1.IBehaviorListener.0-c2~link","e":"click","c":"c2_link2"});
/*]]>*/
</script>
<script type="text/javascript" id="event-click-c3_link3">
/*<![CDATA[*/
Wicket.Ajax.do({"u":"links?0-1.IBehaviorListener.1-c3~link","e":"click","c":"c3_link3","i":"c3_link3--ajax-indicator"});
/*]]>*/
</script>
<script type="text/javascript" id="event-click-success_link4">
/*<![CDATA[*/
Wicket.Ajax.do({"u":"links?0-1.IBehaviorListener.0-success~link","e":"click","c":"success_link4","pre":["return
 false;"],"fh":["alert('Failure');"],"bh":["alert('Before ajax 
call');"],"sh":["alert('Success');"]});
/*]]>*/
</script>
<script type="text/javascript" id="event-click-failure_link5">
/*<![CDATA[*/
Wicket.Ajax.do({"u":"links?0-1.IBehaviorListener.0-failure~link","e":"click","c":"failure_link5","fh":["alert('Failure');"],"bh":["alert('Before
 ajax call');"],"sh":["alert('Success');"]});
/*]]>*/
                
> Rewrite all JavaScript inline event handlers to be proper attached event 
> handlers
> ---------------------------------------------------------------------------------
>
>                 Key: WICKET-3367
>                 URL: https://issues.apache.org/jira/browse/WICKET-3367
>             Project: Wicket
>          Issue Type: Sub-task
>            Reporter: Igor Vaynberg
>             Fix For: 6.0.0
>
>         Attachments: WICKET-3367.patch, WICKET-3367.patch
>
>
> Currently events added inside onclick, onsubmit attributes are problematic 
> because they cannot be cancelled by other event handlers that are attached to 
> events via javascript's addEventListener() and friends. We should extract all 
> such inlined handlers and attach them via our Wicket.Event api.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to