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

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

Not sure how to respond to a comment in Jira, so I copied it below...

> allowdefault - should we rename to stop-propagation which is a more commonly 
> used term? 

A: preventDefault and stopPropagation are different thingies. Now I think 
allowDefault should be removed. Clicking on Ajax link or submitting a form with 
Ajax should not allow the default behavior (non-ajax click/submit). Probably 
I'll drop it.

> one of the biggest pains right now is being able to pass extra parameters 
> back to the server - as in i want to override ajax event behavior to append 
> some  parameters to the callback url. i think the easiest way to do this 
> would be to add a callback parameters attribute that takes a list of 
> functions to which the user can add and we evaluate in order, so: 

A: there is a way to add static parameters. I'll see how to make it easy to add 
dynamically calculated ones

------------------------------- 

> i think using JSON objects to get started is great. but, i think when we are 
> done designing and we are optimizing we should use something of our own so 
> that we dont include any attributes that dont have values. for example, if 
> there is no indicator then the call to .do() should not have i:null, etc. 
> this will make js as short as possible. 

A: the delivered JSON object contains only the entries with values.

> also, maybe we can add iheaderresponse.appendDoCall(attributes). this will 
> allow us to further trim the js by removing multiple "Wicket.AJAX.do(" 
> strings, and instead have one "Wicket.Ajax.do(" that takes a list of maps 

A: this will be better solved with HeaderResponseDecorator that collects all 
onDomReady contributions and delivers them in one <script> element. This is 
part of the patch that Emond and Hielke work on.
                
> 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