Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4041

Script Contribution call on StartUp event of the Report triggering error

$
0
0

Hi guys.

 

On the Script Text available in the onStartup property of my report, I do a :

 

var arr = CMP_1.getBoxNames();
arr.forEach(function(element, index) {  APPLICATION.alert(element);
});

But this is triggering an Error during script processing.

 

If calling the same script text manually (by clicking on a button for example), it's working fine.

 

The getBoxNames method is like so on contribution.ztl :


StringArray getBoxNames() {*        var names = this.RuntimeGetBoxNames;        return JSON.parse(names);
*}

 

And the RuntimeGetBoxNames is like so on cmp.js :

 

this.RuntimeGetBoxNames = function(value) {        if (value === undefined) {            return JSON.stringify(boxNames);        }         return this;
}

 

At Runtime, the RuntimeGetBoxNames should already owns its value, even before the component is loaded (I say this because if I do a alert displaying BTN_1.getText() on startup, it's working).

 

Any idea ?

 

Br,

Vincent


Viewing all articles
Browse latest Browse all 4041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>