Hi guys.
Suppose I have a custom component, and made an API in order to get ids of boxes that are in my component.
I want the designer to be able to parse all the ids I will send him, so in my .ztl file, I've made
StringArray getBoxesId() {* return this.sendBoxesIdToRuntime; *}
The value returned from sendBoxesIdToRuntime is like so :
"["id1","id2",...]"
Note the "" encapsulating the [ ] because actually properties can't hold plain javascript array, so it is "stringifyied".
In the Dialog Window of Script Text, when calling
var value = COMPONENT.getBoxesId();
I receive a StringArray (this is why DS is telling why when I hover above value variable), but I'm not able to call split method on it for example, as exepected in the documentation.
If I change StringArray to String in the .ztl, then doing a
APPLICATION.alert(value);
is showing me the right string (and in this case, DS offers me to call split method on it) :
["id1","id2",...]
Any idea why I'm not able to call methods that are supposed to be exposed for StringArray type ?
Is there something more I need to do in my .ztl file ?
Thanks.
Br,
Vincent