Hi everyone,
I am trying to retrieve data from SAP HANA and add them to a listbox the following code is working but I am not sure if it is the bestpractice, and I am not sure how I can retrieve the selected data from the selected Item that the user has already selected
view:
var oSchemaList = new sap.ui.commons.ListBox("schemaList"); var oModel = new sap.ui.model.odata.ODataModel("/DataGenerator/services/schema.xsodata", true); sap.ui.getCore().setModel(oModel);
Controller:
showSchemas: function (userName) { var oItem = new sap.ui.core.ListItem({text : "{SCHEMA_NAME}"}) sap.ui.getCore().byId("schemaList").addItem(oItem); sap.ui.getCore().byId("schemaList").bindElement("/Schema('"+userName+"')") },
Please advise,
Thank you,
Regards,
Shady