Skip to Content
Sep 23, 2016 at 11:34 AM

Filter Bar aggregation binding not working



I am using sap.ui.comp.filterbar.FilterBar control . I am trying bind aggragtions "filterItems" as below.

<fb:FilterBar reset="onReset" search="onSearch" showRestoreButton="true" showClearButton="true" filterBarExpanded="false"



<fb:FilterItem name="{Name}" label="{Label}">


<Input valueHelpRequest="handleValueHelp" showValueHelp="true" valueHelpOnly="true"/>





and my data looks like:



{"Name":"A", "Label":"LabelA"},

{"Name":"B", "Label":"LabelA"},

{"Name":"C", "Label":"LabelA"},

{"Name":"D", "Label":"LabelA"}



It throws an error in library "filterBar.js",

FilterBar.js:6 Uncaught (in promise) Error: sap.ui.comp.filterbar.FilterBar.prototype.addFilterItem() Expected argument '' may not be null nor empty(…)

I have checked the binding context of filter item in addFilterItem method in filterBar.js, I can see teh proper binding context there.

I tried to bind in script, but no luck.

Is there an issue with aggregation binding of Filter Bar?

Thanks in advance.