Skip to Content
0
Nov 11, 2015 at 10:37 AM

Data Binding

25 Views

I have a Json model with the following data

var sort = { "Field": ["Brownfield", "Greenfield" ], };

var odata_sort_Model = new sap.ui.model.json.JSONModel();

odata_sort_Model.setData( sort);

sap.ui.getCore().setModel( odata_sort_Model, "Sort");

I need to bind that model in an ViewSettingItem Dialog for determine the sort items

var oFilter = new sap.m.ViewSettingsDialog({

// id : "LandscapeListSettingsDialog",

sortDescending : true,

sortItems : {

path : "Sort>/items",

template : new sap.m.ViewSettingsItem({

key : "{Sort>Field}",

text : "{Sort>Field}",

})

},

If i do that sortItems is always empty.

Can someone tell me what is wrong here with this binding?

Best regards.

Dirk