IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Javascript function callback after async command call

    Posted Tue October 21, 2008 03:08 PM

    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

    Thanks in advance

    Sandeep


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 2.  RE: Javascript function callback after async command call

    Posted Tue October 21, 2008 04:59 PM

    Yes you can register client side callback function. For example:

    CAF.model(‘#{activePageBean.clientIds[“asyncButton”]}’).addActionCompleteListener(
    function (commandID) { alert(commandID); }
    );

    For a complete API reference please see:

    http://www.ajax-softwareag.com/articles/3IE5OA/wm_cafshared-doc-7.1.1/wm_cafshared-doc-7.1.1/CAF.Command.Model.html


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 3.  RE: Javascript function callback after async command call

    Posted Tue October 21, 2008 05:55 PM

    Thanks Alex!

    This is what is was looking for…


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 4.  RE: Javascript function callback after async command call

    Posted Mon December 14, 2015 02:04 PM

    Where do you provide "CAF.model(‘#{activePageBean.clientIds[“asyncButton”]}’).addActionCompleteListener(
    function (commandID) { alert(commandID); }
    ); "?
    Can we add actionCompleteListener to command button as well?


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 5.  RE: Javascript function callback after async command call

    Posted Mon December 28, 2015 04:02 AM

    Hey Joy,

    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.


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS