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 😊).
but in the example given, the developer seems to use hard-coded data in case of he got no metadata coming back.
what is the method "resultSetOwner" doing?
as long there is no datasource assigned to the component, the data and metadata are not set, meaning undefined, this is why Mike sets some "dummy" values for this.
Add a comment