Skip to Content
avatar image
Former Member

how to set aggregation binding for ViewSettingsFilterItem?

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"
  }
]
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 26, 2017 at 10:12 AM

    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>
    
    Add comment
    10|10000 characters needed characters exceeded