I'm trying to do odata binding on tableselectdialog. For some reasons, I am finding it hard to make a fragment using SAP WEB IDE so I did not use fragments for the dialog and just made the dialog on the controller. Assuming that most of the properties of table can be seen on tableselectdialog, I was expecting that I will not encounter any errors. I was able to bind my odata on a table. But when I implemented a tableselectdialog, the data binding doesn't seem to work. Can anyone help me solve this error. Below is my code.
A combobox calls the event press with the method handleAddressType. The odata I'm using is /sap/opu/odata/srmnxp/UTIL
handleAddressType: function(oEvent) {
alert(oEvent.oSource.getSelectedKey());
var selectedAddressKey = oEvent.oSource.getSelectedKey();
var otableSelectDialog = new sap.m.TableSelectDialog("tableSelectD", {
noDataText: "No Address Found",
title: "Select Address",
columns: [
new sap.m.Column({
header: new sap.m.Label({
text: "AddressNo"
})
}),
new sap.m.Column({
header: new sap.m.Label({
text: "Name"
})
}),
new sap.m.Column({
header: new sap.m.Label({
text: "City"
})
}),
new sap.m.Column({
header: new sap.m.Label({
text: "Country"
})
})
],
items: {
path: "/",
template: new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{UTIL>AddressNo}"
}),
new sap.m.Text({
text: "{UTIL>Name}"
}),
new sap.m.Text({
text: "{UTIL>City}"
}),
new sap.m.Text({
text: "{UTIL>Country}"
})
]
})
}
});
otableSelectDialog.bindAggregation("items", "UTIL>/ShipToAddressCollection?$filter=Addrtype%20eq%20%27" + selectedAddressKey + "%27",
new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{UTIL>AddressNo}"
}),
new sap.m.Text({
text: "{UTIL>Name}"
}),
new sap.m.Text({
text: "{UTIL>City}"
}),
new sap.m.Text({
text: "{UTIL>Country}"
})
]
}));
otableSelectDialog.open();
}
Thank you in advance