xml - SAPUI5 / OpenUI5 - Load model from manifest -


i trying load northwind v4 odata service view. use tutorial @ https://openui5beta.hana.ondemand.com/#docs/guide/44062441f3bd4c67a4f665ae362d1109.html doesn't work there. declared model in manifest.json file , want display information in basic table. how should this? tried set model in controller, didnt work.

this manifest.json. see, have declared model according developers guide

{   "_version": "1.1.0",   "sap.app": {     "_version": "1.1.0",     "id": "sap.ui.demo.wt",     "type": "application",     "i18n": "i18n/i18n.properties",     "title": "{{apptitle}}",     "description": "{{appdescription}}",     "applicationversion": {       "version": "1.0.0"     },     "datasources": {       "invoiceremote": {         "uri": "/destinations/northwind/v4/northwind/northwind.svc/categories",         "type": "odata",         "settings": {           "odataversion": "2.0"         }       }     }   },   "sap.ui": {     "_version": "1.1.0",     "technology": "ui5",     "devicetypes": {       "desktop": true,       "tablet": true,       "phone": true     },     "supportedthemes": [         "sap_hcb",         "sap_belize"     ]   },   "sap.ui5": {     "_version": "1.1.0",     "rootview": "sap.ui.demo.wt.view.app",     "dependencies": {       "minui5version": "1.30",       "libs": {         "sap.m": {}       }     },     "models": {       "i18n": {         "type": "sap.ui.model.resource.resourcemodel",         "settings": {           "bundlename": "sap.ui.demo.wt.i18n.i18n"         }       },       "invoice": {         "datasource": "invoiceremote"       }     },     "resources": {       "css": [         {           "uri": "css/style.css"         }       ]     }   } } 

this xml file, want set model , display entries.

<mvc:view controllername="odatatest2.controller.main" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"     displayblock="true" xmlns="sap.m" xmlns:com="sap.ui.commons">     <app>         <pages>             <page title="{i18n>title}">                 <content>                     <table items="{/value}">                         <headertoolbar>                             <toolbar>                                 <title text="categories" level="h2" />                             </toolbar>                         </headertoolbar>                         <columns>                             <column>                                 <text text ="category id" />                             </column>                             <column>                                 <text text="category name" />                             </column>                             <column>                                 <text text="description" />                             </column>                         </columns>                         <items>                             <columnlistitem>                                 <cells>                                     <text text="{categoryid}"/>                                     <text text="{categoryname}"/>                                     <text text="{description}"/>                                 </cells>                             </columnlistitem>                         </items>                     </table>                 </content>             </page>         </pages>     </app> </mvc:view> 

here neo-app.json code

{   "welcomefile": "/webapp/index.html",   "routes": [     {       "path": "/resources",       "target": {         "type": "service",         "name": "sapui5",         "entrypath": "/resources",         "version": "1.44.10"       },       "description": "sapui5 resources"     },     {       "path": "/test-resources",       "target": {         "type": "service",         "name": "sapui5",         "entrypath": "/test-resources",         "version": "1.44.10"       },       "description": "sapui5 test resources"     },     {       "path": "/destinations/northwind",       "target": {         "type": "destination",         "name": "northwind"       },       "description": "northwind odata service"     }   ],   "sendwelcomefileredirect": true } 

the problem uri specified in data source points towards categories collection (the categories segment @ end of uri). odata model uri must point towards service root path: /destinations/northwind/v4/northwind/northwind.svc/.

also, binding table against /value path. implies expect having value collection. guess wanted bind against categories collection, should change <table items="{/categories}">.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -