Denis Duval
Denis Duval

Reputation: 43

Primefaces/JSF/Ajax dblclick event

I want to use the dblclick event on the commandlink component of the PrimeFaces framework. I have the following error:

javax.faces.view.fletters.TagException: /templateNote.xhtml @ 22.60 Event: dblclick is not supported.

Thanks for your help.

Here is my code:

<p:commandLink>
<p:ajax event="dblclick"
       listener="#{noteManagerBean.noteSelection(note)}"
       oncomplete="PF('widgetNoteDialog').show()"
       update="idNoteDialog"/>
<p:graphicImage value="images/PostIt#{note.couleur}.png" style="position: absolute; top: 0; left: 0"/>

Upvotes: 0

Views: 989

Answers (1)

Minh
Minh

Reputation: 83

you can try this:

    <p:commandLink value="click me" ondblclick="noteSelection()" onclick="return false;"/>
    <p:remoteCommand name="noteSelection" actionListener="#{testBean.doit}" />

primefaces will generate javascript method "noteSelection", you can call it anytime

Upvotes: 1

Related Questions