Created
January 8, 2015 09:18
-
-
Save shubhadeep/b304d576f736ce991edf to your computer and use it in GitHub Desktop.
OpenUI5 Tree Table Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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