sap ui5绑定Odata北风

时间:2017-06-10 11:10:53

标签: javascript sapui5 northwind

我想在列表项中绑定来自Odata Service Northwind V2的一些值,但输出显示没有数据。我已经在清单中提供了服务。 如果有人帮我解决这个问题会很有帮助。

<List id="listid" items="{model>/Products}"     headerText="Products">
    <items>
    <StandardListItem
        title="{ProductName}"
        description="{model>ProductId}"

        type="Navigation" />

        </items>
</List> 

enter code here

清单:

    "title": "{{appTitle}}",
    "description": "{{appDescription}}",
    "dataSources": {
  "datamodel": {
    "uri": "/destinations/northwind/V2/Northwind/Northwind.svc/",
    "type": "OData",
    "settings": {
      "odataVersion": "2.0"

....... "model": { "dataSource": "datamodel"

neoapp

 "path": "/northwind",
  "target": {
    "type": "destination",
    "name": "northwind"
  },
  "description": "Northwind OData Service"
},

1 个答案:

答案 0 :(得分:0)

你的neoapp中的路径需要在你的manifest.json或其他方面适合uri,例如

..
  "path": "/destinations/northwind", // add /destinations
  "target": {
    "type": "destination",
    "name": "northwind"
  }, 
..