Closed simjl closed 6 years ago
Your right that this is different from the example implementation. And this is just to avoid async timing and assure the metadata is correct. I didn't necessarily want to get into the deeper concepts of things like promises. I've add this line to the template to make the example implementation.
For the code snippet added by ex4_23, the call back method fnLoadMetadata() doesn't seem to be triggered.
But i noticed in your opensap video, there is a direct call to fnLoadMetadata() after attached it as a call back function: bpModel.attachMetadataLoaded(bpModel, function() { fnLoadMetadata(); }); fnLoadMetadata(); / direct call - missing line? /
Is this line missing ? Probably the metadataloaded event already triggred before the call back is attached. It works if i put the code into the promise version of metadataLoaded().then.