开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜