Is there any way to register a javascript callback function with async. command button. My requirement is that when async command button completes the server side action and refresh the client side control then the callback javascript function is called.
Is there any OnComplete event on async. command button
Where do you provide "CAF.model(‘#{activePageBean.clientIds[“asyncButton”]}’).addActionCompleteListener(
function (commandID) { alert(commandID); }
); "?
Can we add actionCompleteListener to command button as well?
you can add that script anywhere in the page in a simple script block. It works only on async command contorls…the same does not work on Command button as behavior of command button is to submit whole form and refreshes whole page. the state will be lost and all your listeners will be wiped off.