Prevent onclick when ondblclick is triggered
stackoverflow world!
I have h:panelGrid, contain开发者_如何学运维ing some elements.
I want to trigger an action when user clicks it and I want to trigger another action when use double clicks it.
I have the following code now:
<h:panelGrid ...>
<a4j:support event="ondblclick" actionListener="#{page.doubleClicked}"/>
<a4j:support event="onclick" actionListener="#{page.clicked}"/>
</h:panelGrid>
So the result... When I click it, I got what I need. But when I double click it, I got three calls: click, click and then doubleclick.
So the question is: how to prevent two click calls when we have a doubleclick?
I need both actions.
http://community.jboss.org/message/62874?tstart=-1
精彩评论