• Per Vedin
    September 22, 2017 at 4:35 am #4574

    I don’t realy understand the usage of these methods…

    I’m trying to get all controls on a page, if I read the JS documentation about bpmext.ui and the getView() metod the first parameter of this method is the path as a string. ex. ‘/subview/subview/etc’ and the second parameter (optional) is the referens wich to start search and  ‘If not specified, search starts from the top of the view tree’ which is exactely what I’m after!

    I have tried both these methods(page.ui.get() and bpmext.ui.getView()) and they always return undefined, always!

    Here is an example, the code resides in a Custom HTML component and the ‘ASEDDGBVFF1’ is a button

    this method is called from a Onload event (@getRoot) on a wrapping  Horizontal Layout wrapping the Custom HTML and button

    function getRoot(me) {

    //page
    var control1 = page.ui.get(‘ASEDDGBVFF1’);
    console.log(control1); //undefined

    //bpmext
    var control2 = bpmext.ui.getView(‘ASEDDGBVFF1’);
    console.log(control2); //undefined

    //sibling
    var control3 = me.ui.getSibling(‘ASEDDGBVFF1’);
    console.log(control3); //WORKING!
    }

    SPARK Support
    September 22, 2017 at 1:26 pm #4577

    Hi Per,

    It looks like you have placed the control within a Coach View.  You may need to add the path of the CV to your call:

    var control1 = page.ui.get(‘/BOLVerksamhetsfelCV/ASEDDGBVFF1’);

    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