Hi,

In my opinion, there should be a Boolean flag to be able enable/disable
even bubbling.

Thanks

Kuga

 

From: Martijn Dashorst [via Apache Wicket]
[mailto:[email protected]] 
Sent: Tuesday, August 17, 2010 5:43 AM
To: Kugaprakash Visagamani
Subject: Should we stop event bubbling after Ajax call?

 

Currently we don't stop events from bubbling after an Ajax call. This 
can be harmful in the following case: 

<tr onclick="... link for going to details of this record..."> 
    <td><input type="checkbox" onclick="ajax call for AjaxCheckBox" />
</td> 
</tr> 

If a user clicks on the checkbox, we send in an ajax request for 
selecting the element. But after the ajax call the onclick bubbles up 
to the tr (as browsers do) and navigates to the details. 

I think that we should always cancel the event after the ajax request 
was handled to prevent it from bubbling up. Does anybody disagree? 

(Note that the CancelEventIfNoAjaxDecorator is a partial solution in 
that it only prevents the default action from happening, not the 
bubbling part (at least for checkbox). 

Martijn 

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
<http://wicketinaction.com?by-user=t> 
Apache Wicket 1.4 increases type safety for web applications 
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8



________________________________

View message @
http://apache-wicket.1842946.n4.nabble.com/Should-we-stop-event-bubbling
-after-Ajax-call-tp2328287p2328287.html 
To start a new topic under Wicket - Dev, email
[email protected] 
To unsubscribe from Wicket - Dev, click here
<http://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl
=unsubscribe_by_code&node=1894267&code=a3Zpc2FnYW1hbmlAaW5mb2Jsb3guY29tf
DE4OTQyNjd8NjM0MjQ4MjIx> . 

 


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Should-we-stop-event-bubbling-after-Ajax-call-tp2328287p2328601.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to