Skip to Content

SAPUI5 - Demo App Tutorial - Need help understanding API documentation

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 14, 2017 at 03:29 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Jun 14, 2017 at 06:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 15, 2017 at 06:33 PM

    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"}

    Add comment
    10|10000 characters needed characters exceeded