I want to use combobox function in xml.view
this is code
xml.view
<c:ComboBox id = "cbbox" items = "{/HHdata}" width = "200px" > <c:items> <core:Item key = "{key}" text = "{text}" /> </c:items></c:ComboBox>
controller.js
onInit: function() {var mData = {
HHdata : [ { "key" : "0", "text" : "All" }, { "key" : "1", "text" : "Approval Request" }, { "key" : "2", "text" : "Approval in Progress" }, { "key" : "3", "text" : "Approval Completed" }, { "key" : "8", "text" : "Deleted" }, { "key" : "9", "text" : "Rejected" } ]
};
var oJsonModel2 = new sap.ui.model.json.JSONModel();
oJsonModel2.setData(mData, true);
console.log(oJsonModel2);
this.getView().byId("cbbox").setModel(oJsonModel2);
// sap.ui.getCore().setModel(oJsonModel);
},
error message
expert help this problem