Showing results for 
Search instead for 
Did you mean: 

How does SAPUI5 configures which xml view has to be displayed?

Former Member
0 Kudos

I'm a newbie to SAP HANA, so this may be a very dumb question, and I apologize for this.

I started creating a new "Quick Start with Layout Editor" project, run it as is, then tried to add a new View with a new Data Set.

I have not found any way to understand why running the project I get the View1.view.xml displayed.

The only possible solution is that there is some weird convention that forces a view named "View1.view.xml" to be displayed through a controller named "View1.controller.js".

So if my new view is named View2 I have not been able to derive how to get it displayed instead of "View1".

I have been able to display my new view only bay renaming it as "View1" (and now I'n not able anymore to diplay the old View1 that has been renamed as "View3" ...)

The script executed by "index.html" is the following

sap.ui.getCore().attachInit(function() { 
     new sap.m.Shell({
         app: new sap.ui.core.ComponentContainer({
                height : "100%",
                name : "QuickStartApplication"

Please help me understand where to configure View1 or View3 or whatever else as the starting point.

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor


in component.js file you can get routing property and its configurations. there you can get your view navigation property and all, something like below:

routing: {
// The default values for routes
config: {
"viewType": "XML",
"viewPath": "",
"targetControl": "",
routes: [{}, {}]

in routes key you can change as appropriate view with desired view name.

May this helps.