Skip to Content
avatar image
Former Member

Data Binding using ViewSettingsFilterItem

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);

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 26 at 10:23 PM

    Hi,

    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?

    Add comment
    10|10000 characters needed characters exceeded