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

sapui5 app not working in Fiori Launchpad

$
0
0

I have the following sapui5 app developed. it works perfectly fine in local WEBIDE and also App is working if executed directly from sicf (for testing).


After clicking on App tile in Launchpad, it opens, but when i use the calendar (Main view), fails to initialize the controller, and display table data.


index.html

 

              
 

Component.js

 

jQuery.sap.declare("my.app.Component");
sap.ui.core.UIComponent.extend("my.app.Component", {  createContent: function() {  // create root view   this.view = sap.ui.view({  id: "idMain",  viewName: "my.app.view.Main",  type: sap.ui.core.mvc.ViewType.XML,  viewData: {  component: this  }  });  return this.view;  }
});

Main.view.xml

 

<core:View controllerName="my.app.view.Main" xmlns:core="sap.ui.core" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"  xmlns="sap.m">  <DatePicker change="handleChange" class="sapUiSmallMarginBottom" id="DP4"  value="{path:'/dateValue', type:'sap.ui.model.type.Date', formatOptions: { pattern: 'yyyy-MM-dd\'T\'HH:mm:ss', UTC: true, source: { pattern:  'HH:mm:ss' } } }"/></core:View>

Main.controller.js

 

jQuery.sap.require("sap.m.DatePicker");
sap.ui.controller("my.app.view.Main", {  handleChange: function(oEvent) {  var sValue = oEvent.getParameter("value");  var url = "/sap/opu/odata/sap/ZFICOUNTOLD_SRV/";  var oModel = new sap.ui.model.odata.ODataModel(url, true);  var aFilters = [];  var oFilter = new sap.ui.model.Filter("S_Date", sap.ui.model.FilterOperator.EQ, sValue);  aFilters.push(oFilter);  sap.ui.getCore().setModel(oModel);  var oTable = new sap.ui.table.Table("table", {  title: "Show Item - Count",  columns: [  {  label: "Count",  template: "Item"  }  ]  });  oTable.setVisibleRowCount(2);  oTable.bindRows({  path: "/CountSet",  filters: oFilter  }); // bind the table rows   oTable.placeAt("content");  }
});

Viewing all articles
Browse latest Browse all 2812

Trending Articles



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