Skip to Content
0

how to set aggregation binding for ViewSettingsFilterItem?

May 02, 2017 at 12:42 PM

73

avatar image
Former Member

i have this code:

<core:FragmentDefinition
  xmlns="sap.m"
  xmlns:core="sap.ui.core">
  <ViewSettingsDialog
    confirm="onSetFilter">
    <filterItems>
      <ViewSettingsFilterItem
        text="BusArea"
        key="BusArea"
        items="{/BusAreaFilterSet}">
        <items>
          <ViewSettingsItem text="{BusArea}" key="{BusArea}" />
        </items>
      </ViewSettingsFilterItem>
    </filterItems>
  </ViewSettingsDialog>
</core:FragmentDefinition>

the Viewsettingsfilteritems appears but when i click on it i get: no data. in the debugger of chrome i saw that no call has been made to the service so probably something with the line:

items="{/BusAreaFilterSet}"

is wrong.

i tried:

{ path: '/BusAreaFilterSet' }, {/BusAreaFilterSet}, {'/BusAreaFilterSet'}, { path: 'BusAreaFilterSet' }

the resultset of the service looks like this:

[
  {
    BusArea : "1234"
  }
  {
    BusArea : "5678"
  }
]
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mario Maisto Jun 26, 2017 at 10:12 AM
0

Hello,

I may be a little late, but this solution worked for me (if anyone has a similar issue) :

Hope this helps,

Regards,
Mario

<filterItems>
  <ViewSettingsFilterItem key="keyArea" text="Area" multiSelect="false" items="{path: '/BusAreaFilterSet'}">
    <items>
     <ViewSettingsItem key="{BusArea}" text="{BusArea}"/>
    </items>
  </ViewSettingsFilterItem>
</filterItems>
Share
10 |10000 characters needed characters left characters exceeded