i want to know any method to refresh pages for mobile or instead of using app.to we can load a view seperately.... right now what happens my page is loading too slow because i am calling these views like this:
Application.js :
main : function() {
sap.ui.localResources("app.view");
var root = this.getRoot();
App = new sap.m.App("MOBILE",{initialPage:"login"});
var loginPage = sap.ui.view({id:"login", viewName:"app.view.login", type:sap.ui.core.mvc.ViewType.JS});
var setContext = sap.ui.view({id:"setContext", viewName:"app.view.setContext", type:sap.ui.core.mvc.ViewType.JS});
var screens = sap.ui.view({id:"screenSelection", viewName:"app.view.screenSelection", type:sap.ui.core.mvc.ViewType.JS});
var standardTransactions = sap.ui.view({id:"transactions", viewName:"app.view.standardTransactions", type:sap.ui.core.mvc.ViewType.JS});
App.addPage(loginPage).addPage(setContext).addPage(screens).addPage(standardTransactions);
App.placeAt(root);
}
index.html:
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="app/css/MobileStyles.css">
<title>Mobile</title>
<!-- src Location of SAP UI5 libraries need to be changed to refer to right location -->
<script
src="/sap/ui5/1/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
type="text/javascript"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-libs="sap.m">
</script>
<script>
jQuery.sap.registerModulePath('Application', 'Application');
// launch application
jQuery.sap.require("Application");
new Application({
root : "content"
});
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
If i have to load any view i have to use app.to() and this method only navigate to the page already loaded first time. If i want to refresh or reload any view what i should do and how to reduce my long loading time.Please tell me any alternative to this ASAP.