Skip to Content

Data Binding using ViewSettingsFilterItem

Dec 04, 2017 at 06:37 AM


avatar image

Hello ,

I am facing one problem in Aggregation binding, binding has done but if there is no data its is showing radio button but i has to give no data.

PFB the code

var vendorFilter = new sap.m.ViewSettingsFilterItem({ text: 'Vendors', multiSelect: false }).bindAggregation("items", "/items", new sap.m.ViewSettingsItem({ text: '{VendorID} {VendorName}', key: 'VENDOR:' + '{VendorID}' }), null, null).setModel(vModel);

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Jan 26 at 10:23 PM


I am a bit confused by your question, but if I understand correctly then why don't you check prior to binding if there is any data to bind with? something along these lines (pesudo draft code)

if (vModel.getProperty("/items") == {}) //Could be vModel.getProperty("/items") == null or anything of that kind
//No data handling

If for some reason you can't do it in the controller, why not pass from the backend a "no data" line to fit the UI or handle it differently on the backend side?

10 |10000 characters needed characters left characters exceeded