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

Not able to get the date selected Item from a listbox after

$
0
0

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


Viewing all articles
Browse latest Browse all 8667

Trending Articles



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