• Bjorn
    September 2, 2016 at 9:24 am #2525

    Hi,
    on BPM 857 cf2016.06 I upgraded my proc app to SPARK UI 4.4.2 TRIAL and then I found that the me.ui.invoke() function does not work anymore. On a Text control inside a custom CV, the on-change handler is supposed to call a function defined as an inline javascript function of the CV. This used to work but not with the new toolkit version. Same issue with Text Area control. Havn’t checked any others.

    The function is defined as:
    this.mytestfunction = function(newtext) {
    console.log(“mytestfunction in view “+this.context.viewid+” was called with text: “+newtext);
    }
    In the change handler:
    me.ui.invoke(‘testcvfunction’, me.getText()); produces an error, hard to read:

    Error in [eventON_CHANGE] inline event handling logic for view /Above/Text1 (UID=0)

    …”: “);console.error(c+b)}};a.ui=a.a={};a.a.PHASE_LOAD=a.a.Db=0;a.a.PHASE_NORMAL=…

    bpmext….6220651 (line 15)
    [email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651:26:218
    [email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651 line 52 > Function:1:1
    [email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651:54:482
    bpmext_control_InitText/[email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Control-Text.js?build=201606220651:24:365
    a.a.mc/[email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651:21:212
    bpmext_control_InitText/this.constructor.prototype.load/[email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Control-Text.js?build=201606220651:19:277

    …”: “);console.error(c+b)}};a.ui=a.a={};a.a.PHASE_LOAD=a.a.Db=0;a.a.PHASE_NORMAL=…

    bpmext….6220651 (line 15)
    Error on change event [/Above/Text1]: Error: Function testcvfunction() not found in ancestor chain from view: /Above/Text1

    …”: “);console.error(c+b)}};a.ui=a.a={};a.a.PHASE_LOAD=a.a.Db=0;a.a.PHASE_NORMAL=…

    bpmext….6220651 (line 15)
    Call stack: [email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651:26:218
    [email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651 line 52 > Function:1:1
    [email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651:54:482
    bpmext_control_InitText/[email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Control-Text.js?build=201606220651:24:365
    a.a.mc/[email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Core.zip/com/salientprocess/bpm/views/bpmext.js?build=201606220651:21:212
    bpmext_control_InitText/this.constructor.prototype.load/[email protected]://ibmbpm:9443/teamworks/webasset/2064.4f21e0a9-7fa1-4090-bd28-4f80f00671be/W/BPMExt-Control-Text.js?build=201606220651:19:277

    …”: “);console.error(c+b)}};a.ui=a.a={};a.a.PHASE_LOAD=a.a.Db=0;a.a.PHASE_NORMAL=…

    I could make the function call work by using the @mytestfunction() instead of the invoke, but then I can’t pass arguments, right?

    SPARK Support
    September 6, 2016 at 1:00 pm #2529

    Hello Bjorn,

    You should be able to call the function without using the @ symbol or me.ui.invoke().

    Try calling your function in the On Change handler: testcvfunction(me.getText());

    See the attached screenshots of a function I modified to work in the Trial version with “Hello” passed as var msg.

    Regards,

    Stephen P.

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

You must be logged in to reply to this topic.

Start typing and press Enter to search