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