Hi there,
I'm trying something quite simple, but can't get it work.
I got a component which is data bounnd.
That compoment has a property named "data" type "ResultSet". (I dont post the XML-part here since everybody should know how it looks like).
In component.js I set the data like that:
this.data = function(value) { if (value === undefined) { return data; } else { data = value; console.log('data has been set',data); return this; } };
Now, I would like to read the data property as a string.
In contribution.ztl I have the following function:
/* Get data as String */ String getDataAsString() {* return JSON.stringify(this.data); *}
But this method allways returns an empty string.
I'm sure the data property is not empty, since I can see the data object in the console output.
Do I make an obvious mistake?
Thanks,
ben