cancel
Showing results for 
Search instead for 
Did you mean: 

UI5/FioriElements: this.getview is not a function

max_mueller007
Explorer
0 Kudos
1,919

Hi,

Although many questions exist on the same topic, I could not resolve this looking at them.

Following is my code:

Following is a snippet from the manifest.json to trigget the same:

Following is my file structure:

Following is the error I get:

How can I resolve this issue?

Many Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

BrijeshGandhi
Product and Topic Expert
Product and Topic Expert
0 Kudos

I see that you're working with controller extension , you can get the view with : this.base.getExtensionAPI()._view

Additionally this link could help you working with Dialogs and Upload files : https://blogs.sap.com/2022/11/21/upload-data-from-excel-in-cap-node.js/

AlexNecula
Active Contributor
0 Kudos

The methode getView() is part of sap.ui.core.mvc.Controller which you have commented.

From my view, the controller might not be described properly.

max_mueller007
Explorer
0 Kudos

Yes, I added the commented part after looking some of the solutions on the internet, but that unfortunstely did not work. What would be the best way to make it work?

Thanks.

AlexNecula
Active Contributor
0 Kudos

Follow the instructions here to see how to define a controller (notice Controller.extend). You are returning a regular object instead of an instance of the Controller class. Your controller must inherit sap.ui.core.mvc.Controller otherwise the method getView() is not available.