0
I want to run 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!");
});
}
Possible duplicate of How to load a jQuery function when loading a page that uses JSF and Primefaces
– Danilo Pádua