Configure number of items loaded by aggregation binding within XML Views

XML Views represent the layout much better than JS Views in UI5. By default, lists etc. load a restricted number of items through aggregation binding. You can extend this without programming within XML Views. It requires configuration of the binding with the length parameter. This will set the $top option in the underlying OData query.

We apply it in the example below for suggestion items of an input field, but you are not restricted; any other aggregation binding can be setup like this. It works with JSON Models too.

<Input id="myInput" type="Text" placeholder="{i18n>pholdType}" showSuggestion="true" 
 suggestionItems="{path:'app>/aItems', length: 600 }" width="20rem" maxSuggestionWidth="34rem">
 <suggestionItems>
  <core:ListItem text="{app>type}" additionalText="{app>typeText} {app>typeLongText}"/>
 </suggestionItems>
</Input>

Good thing, that this will not override the size limit setting of your OData Model, however take care of harmonization with the paging settings of specific controls, which have such built in feature like sap.m.List (growingThreshold etc.), where you can reach your goal without the length parameter.

SAPDEV.EU
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.