question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ObjectPage: async creation of block views

See original GitHub issue

OpenUI5 version: 1.58.5

Browser/version (+device/version): Chrome 70

Hello,

Lately, I was checking my application with support assistant and found the following:

The XML view 'MyPageBlock' is loaded synchronous. Please take a look at the resolution 'Instantiating Views'.

I was trying to find something about the async block view creation in the BlockBase documentation, but didn’t find anything. So, I just tried to add an “async”: true to my block view definition:

		metadata: {
			views: {
				Expanded: {
					viewName: "MyBlockView",
					type: "XML",
					async: true
				} ...

It’s sorta helped - I don’t see this error anymore, but I found another issue - this.oParentBlock became undefined in the block’s controller.

Could you give me some advice on this or is it a bug?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
boghyoncommented, May 15, 2019

Since https://github.com/SAP/openui5/commit/773800eb93677a66b43d21e51f091723cf1d45f6, the BlockBase creates views always asynchronously. And the oParentBlock is available in the onParentBlockModeChange handler of the controller.

return Controller.extend("...", {
  onParentBlockModeChange: function(sMode) {
    // this.oParentBlock is available here
  },
  // ...
});
1reaction
grischancommented, Apr 17, 2019

Hi, is there a plan when this feature will be available? Version 1.xx?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step 5: Using Object Page Layout as a Detail Page
In this step, we add sap.uxap.ObjectPageLayout to the detail page to display more information about each product.
Read more >
How do I wait for an asynchronously dispatched block to finish?
Trying to use a dispatch_semaphore . It should look something like this: dispatch_semaphore_t sema = dispatch_semaphore_create(0); [object ...
Read more >
The Proper Way to Write Async Constructors in JavaScript
In my opinion, it is best to explicitly tell the user (through the type signature) that the function returns Promise<this> rather than relying ......
Read more >
salesforce maps advanced configuration
UI issue in Maps List View Advanced Search option when using multiple checkboxes ... any included code block backgrounds do not show as...
Read more >
Asynchronous Programming - EF Core - Microsoft Learn
Querying and saving data asynchronously with Entity Framework Core. ... SaveChanges, which will block a thread while database I/O is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found