• Saroj Panda
    January 31, 2017 at 8:06 am #3610

    I have created custom CoachView by using the BPMExt-Control-Decimal.js file available in SPARK toolkit. Currently the default behavior of change event is working as expected, but I want to perform additional activities after the completion of the change event.

    I tried redefining this.constructor.prototype.change method in inline javascript but then it ignores the function defined in JS and I don’t want to override the default expected implementation, instead I want to extend it further. (may be the last option)

    Also I tried [bpmext.ui.addEventSubscription(“eventON_CHANGE”, function(){alert(“on change”)}, this);] but didn’t get it work.

    I checked at methods listed in help link but not finding the right one, or may be confused.

    What will be the best way to register additional behavior on change event of the control.




    SPARK Support
    February 10, 2017 at 2:53 pm #3666

    HI Saroj,

    Is there an issue with using the configuration option for an On Change event?

    This can call myFunction() from the On Change event.


    Stephen P.

    Tomáš Navrátil
    February 16, 2017 at 4:02 pm #3743

    Hi Saroj,

    you can extend default control functionality by wrapping original change handler in your custom method, that can contain the additional logic. See below an example of code to be appended to your control’s inline JavaScript that does exactly that:

    // Get current coach view prototype.
    var proto = this.constructor.prototype;
    // Detect our extension flag, so the prototype is extended only once.
    if (!proto._extendedDecimal) {
        // Set extension flag.
        proto._extendedDecimal = true;
        // Get original change handler.
        var superChange = proto.change;
        // Assign new change handler.
        proto.change = function (event) {
            console.log('Extended Decimal Change Event Called');
            // Call parrent change event.
            superChange.apply(this, arguments);
            // Add your additional logic here...

    Please let me now if it solves your problem.

    Best regards,


    SPARK Support
    February 17, 2017 at 3:19 pm #3766

    Hi Tomas,

    Thank you for the feedback.

    I should note that this would be best to do by copying to a new toolkit, as any changes will be overwritten upon the upgrade of SPARK dependency.  And, also note that modifications to the controls will be unsupported.


    Stephen P.

    Saroj Panda
    February 20, 2017 at 12:00 am #3770

    Hi Thomas,

    Thanks for your code snippet. This surely seems will work. Currently, I’m working on other issues and will try this sometime later.

    Hi Stephen,

    I agree this handle should be in custom coach view extending the default ones

    I’ll share more once I explore this




    SPARK Support
    February 22, 2017 at 9:57 am #3796

    Hi Saroj,

    I look forward to hearing your results.


    Stephen P.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search