cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 - Demo App Tutorial - Need help understanding API documentation

BenedictV
Active Contributor
0 Kudos

Hi,

I wanted to get to know the basics of SAPUI5 and was trying the demo app @ Initialize the App

//
create a mobile app and display page1 initially
var app = new sap.m.App("myApp", { initialPage:
"page1"
});

The API reference for sap.m.App has two inputs, an ID and Settings. But here we pass a variable "initialPage". How does this work? How should I relate this with the API reference?

BenedictV
Active Contributor
0 Kudos

I couldn't select a relevant secondary tag and just selected out of frustration after multiple tries 😐

BenedictV
Active Contributor
0 Kudos

yeah, on hindsight..I should have not done that 🙂

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor

Answers (2)

Answers (2)

Sharathmg
Active Contributor

The App class extends the parent class NavContainer. The association property of Nav container is "initialpage". This initial page property tells which should be the initial page to be loaded.

https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.m.NavContainer.html#constructor

Regards,

Sharath

vineet_gupta3
Participant
0 Kudos

Here is how I understand this:

Like you said the API reference for sap.m.App describes two Parameters. Their types are:

Parameters:

string sId? id for the new control, generated automatically if no id is given

object mSettings? initial settings for the new control

In the call

sId(string) = "myApp"

mSettings(Object) = { initialPage:"page1"}