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

Help with my oData model

$
0
0

Hi all,

 

i just started on UI5. I'm trying to show a list of employees loaded from a local mySQL table and i can't make it work:

 

- My mySQL DB is mounted and working.

- I made a oData service connected to de DB and is working (i can see $metadata using URL on Chrome)

 

I suspect the problema is my UI5 code:

 

manifest.json:

"sap.ui5": {

          ...

    "config": {

       "mVentas": "http://localhost:8080/ventas-web/ventasweb.svc/"

    },...

 

Component.js:

...

        var oConfig = this.getMetadata().getConfig();
        var oVentas = new sap.ui.model.odata.v2.ODataModel(oConfig.mVentas);

        this.setModel(oVentas, "modeloVentas");

...

 

View.view.xml:

...

   <List id="ventasList" headerText="Ventas" items="{modeloVentas>/Venta}">

    <items>

     <ObjectListItem

      title="{modeloVentas>/IdEmpleado}"/>

    </items>

   </List>

...

 

 

when i run the app it says

 

http://localhost:8080/ventas-web/ventasweb.svc/$batch 400 (wrong request)

 

 

Am i doing anything wrong ?

 

thx in advance


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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