javascript - SAPUI5 Filling SmartTable with OData from XMII -
i'm trying fill smart table (xml view) odata our mii server. keep getting following errors:
error: resource path/component-changes.json not loaded ./component-changes.json. check 'file not found' or parse errors. reason: not found - 'getchanges' failed: -
this main.controller.js:
sap.ui.controller("path.view.main", { /** * called when controller instantiated , view controls (if available) created. * can used modify view before displayed, bind event handlers , other one-time initialization. * @memberof sapui5.main */ oninit: function() { var omodel, oview; this.oupdatefinisheddeferred = jquery.deferred(); this.getview().byid("main").attacheventonce("updatefinished", function(){ this.oupdatefinisheddeferred.resolve(); }, this); sap.ui.core.uicomponent.getrouterfor(this).attachroutematched(this.onroutematched , this); var omodel, oview; omodel = new sap.ui.model.odata.odatamodel("http://server:port/xmii/illuminatorodata/querytemplate?querytemplate=messagemonitor%2ftemplates%2fquery%2fmiilogdetailsqry&content-type=text%2fxml", {annotationuri: "/xmii/illuminatorodata/$metadata"}); jquery.sap.log.error(omodel.getmetamodel()); omodel.setcountsupported(false); var otable = this.getview().byid("otable"); otable.setentityset("messages"); otable.setmodel(omodel); oview = this.getview(); oview.setmodel(omodel); otable.rebindtable(); }, onroutematched : function(oevent) { var olist = this.getview().byid("main"); var sname = oevent.getparameter("name"); var oarguments = oevent.getparameter("arguments"); // wait list loaded once jquery.when(this.oupdatefinisheddeferred).then(jquery.proxy(function() { var aitems; // on empty hash select first item if (sname === "main") { //this.selectdetail(); } // try select item in list if (sname === "product") { aitems = olist.getitems(); (var = 0; < aitems.length; i++) { if (aitems[i].getbindingcontext().getpath() === "/" + oarguments.product) { olist.setselecteditem(aitems[i], true); break; } } } }, this)); }, });
i'm developing on server have no issues cors errors otherwise.
my main.view.xml:
<core:view xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:smartfilterbar="sap.ui.comp.smartfilterbar" xmlns:smarttable="sap.ui.comp.smarttable" controllername="path.view.main" height="100%" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.customdata/1"> <page id="main" title="{i18n>pagetitle}" shownavbutton="false"> <toolbar></toolbar> <content> <smartfilterbar:smartfilterbar id="smartfilterbar" entitytype="messages" persistencykey="smartfilter_explored"> <smartfilterbar:controlconfiguration> <smartfilterbar:controlconfiguration key="category"> <smartfilterbar:defaultfiltervalues> <smartfilterbar:selectoption low="i"> </smartfilterbar:selectoption> </smartfilterbar:defaultfiltervalues> </smartfilterbar:controlconfiguration> <smartfilterbar:controlconfiguration key="datetime"> <smartfilterbar:defaultfiltervalues> <smartfilterbar:selectoption low="2014"> </smartfilterbar:selectoption> </smartfilterbar:defaultfiltervalues> </smartfilterbar:controlconfiguration> </smartfilterbar:controlconfiguration> </smartfilterbar:smartfilterbar> <smarttable:smarttable id="otable" entityset="messages" smartfilterid="smartfilterbar" tabletype="table" useexporttoexcel="false" usevariantmanagement="false" usetablepersonalisation="false" header="messages" showrowcount="false" persistencykey="smarttableanalytical_explored" enableautobinding="true" /> </content> </page>
my component.js, index.html , myrouter.js setup according sap hana step step guide first application.
i'm clueless on issue might be.
thanks in advance.
the file component-changes.json read variant management should not prevent data in smart table loading. , since have set enableautobinding system make call service/messages?
Comments
Post a Comment