Skip to Content
0
Oct 01, 2014 at 09:43 AM

Read data from oData model and show them in listBox

3738 Views

Hi guys,

I am trying to create a listbox which contains data coming from HANA Database, using rest services and oData model, so I have came out with the following code to get the data, but I am not sure how to add them/bind them to the listBox in this case.

The code below is working, as I get a success response with the data.

Would you please advise ?

       oModel.read(
            "/Schema(" + "'"+data+"')",
            null, [],
            true,
            function (oData, oResponse) {
            console.log("Success!");
            },
            function (oError) {
            sap.ui.commons.MessageBox.alert("Error ! Username is not found !");
            }
        );
  

Thank you so much for your support,

Shady