Mike B.
Mike B.
To conclude, the problem is that `this.getRootControl(0)` is `null` due to `sap.ui.core.IAsyncContentCreation`. If I remove `sap.ui.core.IAsyncContentCreation`, then `this.getRootControl(0)` is not `null` anymore and everything is OK.
Thanks, I'll try to figure out how to implement such async behavior. But up-to-dated documentation with real-life code snippets would be welcomed. Regarding `getRootControl`, which does not expect any parameters....
> _Maybe IDEA only recognizes the method name `getRootControl` and mistakenly shows the documentation for `UIArea`?_ IDEA relies on the https://github.com/DefinitelyTyped/types/openui5 project, [there](https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/openui5/sap.ui.core.d.ts) you can find: ```js /** * @deprecated...
BTW, is it a right assumption that with `sap.ui.core.IAsyncContentCreation` implemented there is no more need in `"async": true` in `routing/config` and `rootView` of manifest.json?
> _You could use [`rootControlLoaded`](https://openui5nightly.hana.ondemand.com/api/sap.ui.core.UIComponent#methods/rootControlLoaded) before creating the fragment._ @codeworrior, thanks a lot, it looks like I solved the issue by turning `init(…)` into `async` function and awaiting for the...
> Or do you see any *.js XHRs in the network tab (there should be none, we use them only in the sync loading case)? Since it's a sandbox project...
> Reg. `async init`: please be aware that the framework will not wait for the promise returned by your `init` method. > The purpose of `IAsyncContentCreation` rather is to allow...
> https://blogs.sap.com/2018/04/26/ui5ers-buzz-29-asynchronify-your-app/comment-page-1/#comment-545788 @boghyon , among the described by you reasons, I had only `"preload": true` for the `i18n` model, I've removed it but still have the warning.
BTW, some lifehack how to see who is leading to sync requests is to use a [Permissions-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy) feature aka Feature-Policy: ```js res.setHeader("permissions-policy", "sync-xhr=()"); ``` then you'll get in DevTools a...
> _I forgot to mention this earlier, the i18n issue I described is already tracked internally via a backlog item: CPOUI5FRAMEWORK-286_ That's a great news. > _Let's keep this open...