Skip to Content
0
Dec 02, 2019 at 01:36 PM

Drop Down Binding Problem with a field within Table - UI5

760 Views

Hello Experts,

Not sure what's happening with this binding. I have added drop-down for one field in table. Based on another field value drop-down dynamically changes.

I have used Combo-Box event "loadItems" to read data from Backend and when trying to bind back to drop-down field it's not working...

Here is my XML View.

<ComboBox id="Mrkt" value="{Markets}" loadItems="readMarket" > </ComboBox>

JS - Read Odata and Binding wirtten on method "readMarket"

var oJsonModel = new JSONModel(); var oDropDown = this.getView().byId("Mrkt");

oModel.read("/ReadSet", {

async:false, filters:oFilters, urlParameters:{"$select": "Zmarket"},

success: function(oData, oResponse) {

oJsonModel.setData({ items : oData.results });

oDropDown.setModel(oJsonModel);

oDropDown.bindAggregation("items", "/items",

new sap.ui.core.ListItem({ text: "{Zmarket}" })

}

Here's final Debugging data.

results.png

Result looks like below

Can you tell me what i am missing.

Attachments

results.png (6.4 kB)
results.png (1.5 kB)