Hi all.
i use eclipse for development sap ui5 applications.
i use xml view.(What do you suggest you(js ?)).
my controller.js;
sap.ui.controller("ui5_example.oView", {
onInit: function() {
var oView = this.getView();
var oModel = new sap.ui.model.json.JSONModel("source.json");
oView.setModel(oModel);
},
});
my xml view;
<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
controllerName="ui5_example.oView" xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="UI5 MVC TEST">
<content>
<List
headerText="Kişiler"
items="{path: '/'}" >
<StandardListItem
title="{bpnm}"
iconDensityAware="false"
iconInset="false" />
</List>
</content>
</Page>
</core:View>
my html file;
<script>
sap.ui.localResources("ui5_example");
var app = new sap.m.App({initialPage:"firstView"});
var page = sap.ui.view({id:"firstView", viewName:"ui5_example.oView", type:sap.ui.core.mvc.ViewType.XML});
app.addPage(page);
app.placeAt("content");
</script>
i running project but showing not data.
please help me