• Alex2018
    September 21, 2017 at 10:21 am #4571

    Hi ,

    I am trying to call  Spark control from Custom HTML as show in the example book Deliver Modern UI page 165

    page.ui.get(“button1″);

    page.ui   returns _<span class=”name” style=”min-width: 0px; min-height: 0px; box-sizing: border-box; color: #881391; flex-shrink: 0; font-family: Consolas, ‘Lucida Console’, ‘Courier New’, monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: nowrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>ngcView</span><span class=”object-properties-section-separator” style=”min-width: 0px; min-height: 0px; box-sizing: border-box; flex-shrink: 0; padding-right: 5px; color: #212121; font-family: Consolas, ‘Lucida Console’, ‘Courier New’, monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: nowrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>:</span><span class=”object-value-undefined value” style=”min-width: 0px; min-height: 0px; box-sizing: border-box; color: #808080; font-family: Consolas, ‘Lucida Console’, ‘Courier New’, monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: nowrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>undefined</span>  and I can’t get the button1.

    What is the problem please or it is only working from function call.

    Thanks

     

    Alex2018
    September 21, 2017 at 10:23 am #4572

    sorry the page.ui   returns  _ngcView:undefined
    <div>and I can’t get the button1.</div>
    <div></div>
    <div>What is the problem please or it is only working from function call.</div>
    <div></div>
    <div>Thanks</div>

    Alex2018
    September 21, 2017 at 10:25 am #4573

    and I can’t get the button1.

    What is the problem please or it is only working from function call.

    Sorry for all the messages

    Thanks

    SPARK Support
    September 25, 2017 at 9:46 am #4624

    Hi Alex,

    Can you provide a screen shot of your layout configuration for the Button control?

    Also, what happens when you attempt to call page.ui.get(“ControlName”) from the console?

    Regards,

    Stephen P.

    Alex2018
    September 30, 2017 at 12:09 pm #4686

    Hi Stephen ,

    please find attach

    Thanks.

    SPARK Support
    October 3, 2017 at 9:04 am #4695

    Hi Alex,

    I was able to successfully execute the code in my test harness, and added and additional line for:

    console.log(“test name: ” + test.ui.getAbsoluteName()); which outputs /Button1

    When you reach the debugger statement, what happens when you attempt to call page.ui.get(“Button1”) from the console?

    Regards,

    Stephen P.

    Alex2018
    October 3, 2017 at 6:25 pm #4698

    attach

    as you can see the page.ui is undefined

    I can attach the twx file

    thanks.

    SPARK Support
    October 4, 2017 at 11:00 am #4702

    Hi Alex,

    What you are seeing for page.ui is normal.  However, you should be able to expand _proto_ and see the available methods.

    As for the call to page.ui.get(), are you sure the name and path are correct?  If the button is nested within a Coach View, the name must include the complete path (ie: /Showcase_CV1/Button1).

    Use the Element Inspector in browser Developer Tools to look at the control-name attribute of the div containing the button.

    Which version of BPM and SPARK are you using?

    Regards,

    Stephen P.

    Alex2018
    October 6, 2017 at 6:27 pm #4711

    thanks !

    adding coachview path works fine

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

You must be logged in to reply to this topic.

Start typing and press Enter to search