Closed lboehm closed 2 years ago
Hi @IObert,
i have found another problem that is related to this: When generating a new view, the new generated view is using the BaseController as expected.
But the BaseController, that is generated when the whole project is generated, has a reference to webapp/model/formatter
which doesn't exist:
sap.ui.define(
[
"sap/ui/core/mvc/Controller",
"sap/ui/core/routing/History",
"sap/ui/core/UIComponent",
"com/myorg/myUI5App/model/formatter"
],
...
When trying to display the newly generated view the browser console shows this error:
Uncaught (in promise) ModuleError: Failed to resolve dependencies of 'com/myorg/myUI5App/controller/DetailView.controller.js'
-> 'com/myorg/myUI5App/controller/BaseController.js'
-> 'com/myorg/myUI5App/model/formatter.js': failed to load 'com/myorg/myUI5App/model/formatter.js' from ./model/formatter.js: script load error
EDIT 05.12.2021 / 2pm
Again, I did some reseach as I wanted to fix at least the issue for the missing formatter.js
. Unfortunately this seems to be associated with @sap-ux/fiori-freestyle-writer
as well.
The files, where the text created
is blue, are created by @sap-ux/fiori-freestyle-writer
, correct? If yes, I would assume, the directory /webapp/model
comes from @sap-ux/fiori-freestyle-writer
and there's no formatter.js
.
Easy way would be to just remove the reference to formatter.js
in the BaseController.js
. But the formatter.js
is quite useful, so I think that this is not the solution.
BR, Lukas
It's me again - sorry for spamming 😃
I did some research, because I wanted to provide a pull request. I think the issue is, that generator-ui5-project
uses @sap-ux/fiori-freestyle-writer
and this package doesn't know anything of the BaseController.js
.
And the open source community can't help to fix this issue, as `@sap-ux packages are closed source, right?
Does anybody have an idea how to solve that problem?
Yep, I immediately expected that this came with the @sap-ux/fiori-freestyle-writer
when you mentioned this. I'll include @vobu here as there is already another issue with this package integration.
WDYT?
yep, on my list.
Hi,
easy-ui5 is generating a
MainView.controller.js
and aBaseController.js
. But theBaseController.js
is not used by theMainView.controller.js
, so I have to changeMainView.controller.js
manually to make use of theBaseController.js
.Easy-Ui5 version:
OS/version:
Windows 10
Steps to reproduce the problem:
Generate a project like this:
What is the expected result?
I would expect the
MainView.controller.js
to use theBaseController.js
.What happens instead?
Instead
MainView.controller.js
usessap/ui/core/mvc/Controller
:Thanks & Best regards, Lukas