Hi guyz.
After a user binds a data source to a custom component, I have a function that is launched.
Inside this function, I'm doing a
datasource_metadata = that.callRuntimeHandler("getMetadataAsString");
To get the metadata from the component
this.getMetadataAsString = function() {
return JSON.stringify(that.resultSetOwner()); // returns the resultSet-typed property
}
The problem is that the getter seems to be faster than the setter.
So when this.getMetadataAsString is called, the metadata value has been not set yet inside the resultSetOwner property.
What can I do to go through this problem (no answer based on setTimeout please ).
PS : I read this post : SAP SDK - dynamic Data Source/Dimesion names?
but in the example given, the developer seems to use hard-coded data in case of he got no metadata coming back.