Skip to content

Instantly share code, notes, and snippets.

@shubhadeep
Created January 8, 2015 09:18
Show Gist options
  • Save shubhadeep/b304d576f736ce991edf to your computer and use it in GitHub Desktop.
Save shubhadeep/b304d576f736ce991edf to your computer and use it in GitHub Desktop.
OpenUI5 Tree Table Test
// OpenUI5 Tree Table Test binding to OData Model
(function (serviceUrl, entitySet, navigationProperty, label, propertyBindingPath) {
var tt = new sap.ui.table.TreeTable({
columns: [
new sap.ui.table.Column({
label: label,
template: new sap.m.Label({text: propertyBindingPath})
})
]
}),
navigationParameters = {};
navigationParameters[entitySet] = navigationProperty;
tt.setModel(new sap.ui.model.odata.ODataModel(serviceUrl, true));
tt.bindRows({
path : "/" + entitySet,
parameters : { navigation : navigationParameters }
});
tt.placeAt("content");
})("http://www.corsproxy.com/services.odata.org/V2/Northwind/Northwind.svc",
"Employees",
'Employees1',
"Last Name",
"{LastName}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment