I am trying to pass bean values to javascript code after ajax update but it doesn't work.
<p:commandButton action="#{bean.transactionStarted}" onclick="userclicked(xhr,args,status)"/>
And the backing bean adds the value via:
RequestContext.getCurrentInstance().addCallbackParam("message", "message");
When I debug I am seeing upper statement executed correctly but it does not arrive to js and it is not alerting:
function userclicked(xhr, status, args) {
alert(args.message);
}