I try to do this but I never get it work ;why is that ajax not supported ??
<p:commandButton value="MAJ" rendered="#{LigneXL.resultat eq 'Pas de FMD'}" onclick="confirmation.show()" >
<f:setPropertyActionListener target="#{parserXls.selectitem}" value="#{LigneXL}" />
<p:ajax event="click" listener="#{parserXls.listenercomposant()}"/>
</p:commandButton>
Listener is never executed Why !!! I'm trying to get another object according to selectitem
public void listenercomposant(){
composantitem=ChercherComposant(selcetitem.getRefcomposant(), selcetitem.getReffabricant());
}
The p:commandButton
is already natively ajax enabled. So there is no need to have a p:ajax
inside and and you can just use
<p:commandButton value="TestButton" actionListener="#{bean.saveSomething}" id="id"
update="panel" />
As you can see p:commandButton
already has and actionListener so just use that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With