Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Is it possible to dynamically set first page of sapui5 app?how?

$
0
0

Hi,

My requirement is first i need to load login page.when the user is not logged out next time when he login he should get dashboard page.if logged out he should see login page?experts plz help

 

app.view.js is below..

sap.ui.jsview("com.opensap.App", {

 

  getControllerName: function() {

  return "com.opensap.App";

  },

 

 

  createContent : function(oController) {

 

  // Main app container we app pages to, can control the flow of application

  this.app = new sap.m.App();

 

 

  // Pre-load all the views, this can also be achieved with lazy loading when the page is required

  // by checking for the existence of the page instance.

  var ProductDetailPage = sap.ui.jsview("ProductDetail","com.opensap.ProductDetail");

  ProductDetailPage.app = this.app;

  this.app.addPage(ProductDetailPage);//this is login page

 

  var DashboardPage = sap.ui.jsview("Dashboard","com.opensap.Dashboard");

 

  // Make the app instance available to each view for easy access by the controller

  DashboardPage.app = this.app;

  this.app.addPage(DashboardPage);

 

  var ProductListPage = sap.ui.jsview("ProductList","com.opensap.ProductList");

 

  // Make the app instance available to each view for easy access by the controller

  ProductListPage.app = this.app;

  this.app.addPage(ProductListPage);

 

 

  return this.app;

  } // end createContent

});


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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