cancel
Showing results for 
Search instead for 
Did you mean: 

BaseController

Former Member
0 Kudos

I have been following one tutorial, but I am having some troubles with the BaseController.

- Structure of my project

If I am not wrong, I have to do the following steps:

1- Create the BaseController.js

sap.ui.define([
		"sap/ui/core/mvc/Controller"
	], function (Controller) {
		"use strict";


		return Controller.extend("mapping.controllers.BaseController", { ...

2- Loading it in the view/fragment that I want to use it, and extend it.

sap.ui.define([
    'mapping/controllers/BaseController',
    'sap/ui/core/routing/History',
	'jquery.sap.global',
	'sap/ui/core/mvc/Controller',
	'sap/m/Popover',
	'sap/m/Button'
], function(BaseController, History, jQuery, Controller, Popover, Button) {
	"use strict";


	return BaseController.extend("mapping.controllers.Main", {

I am following that Steps by I get the following error:

Former Member

It was just an stupid mistake. The name of the file was "BaseController.controller.js" instead of "BaseController.js" so it was failing. Solved

View Entire Topic
former_member206705
Participant
0 Kudos

The SAP UI5 documentation already specifies that this shouldn't be done. You're trying to load the resource asynchronously, but you're accessing it synchronously!! See https://sapui5.hana.ondemand.com/#/api/sap.ui (see method sap.ui.define)

Thanks and best regards,

Shilpa