Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8594

Re: Navigation in app / call app.to("page")

$
0
0

Hi

var app = new sap.m.App("myApp" , {initialPage: "Page1"});

       

        var page1 = new sap.m.Page("Page1" , {

            title: "Initial Page",

            content: new sap.m.Button({

                text:"Go to page 2",

                tap: function(){

                    app.to("Page2");

                }

               

            })

        });

       

       

        var page2 = new sap.m.Page("Page2", {

            title: "Page 2",

            showNavButton: true,

            navButtonTap: function(){

                app.back();

            },

           

            content: new sap.m.Text({text: "Hellow Mobile World"})

        });

       

       

        app.addPage(page1).addPage(page2);

       

        app.placeAt("content");

 

 

 

 

Try executing this and see if this works for your and then its a matter of doing it in XML.

 

please give us your comments on the results.

 

Thanks


Viewing all articles
Browse latest Browse all 8594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>