tags:

views:

14

answers:

0

Hello, stackoverflow world!

I have h:panelGrid, containing 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.