Calling JQUERY function with Primefaces [closed]

0

I want to execute a JQuery call after the click of a button:

<p:commandButton id="btnSelecionaLote" icon="ui-icon-pencil" action="#{loteController.selecionarLote()}">
    <f:setPropertyActionListener value="#{lote.id}" target="#{loteController.loteBean.id}"></f:setPropertyActionListener>
</p:commandButton>

JQuery

function testePrime(){
        $("#formLote\:btnSelecionaLote").click(function() {
            alert("testing!");
        });
}
    
asked by anonymous 27.11.2015 / 14:32

2 answers

0

I solved the problem with the following code:

onclick="jQuery(PrimeFaces.escapeClientId('tabelaRaca')).hide()"
    
30.11.2015 / 13:23
0

You have to import your .js file that has the function you want to call so just include outputScript in your code:

<h:outputScript library="primefaces" name="arquivo.js" />

NO STACK ANSWER:

link

    
27.11.2015 / 14:36