<mvc:View
	controllerName="sap.ui.demo.masterdetail.controller.Master"
	xmlns="sap.m"
	xmlns:semantic="sap.f.semantic"
	xmlns:mvc="sap.ui.core.mvc">

	<semantic:SemanticPage
		id="masterPage"
		preserveHeaderStateOnScroll="true"
		toggleHeaderOnTitleClick="false">
		<semantic:titleHeading>
			<Title
				id="masterPageTitle"
				text="{masterView>/title}"
				level="H2"/>
		</semantic:titleHeading>
		<semantic:content>
			<!-- For client side filtering add this to the items attribute: parameters: {operationMode: 'Client'}}" -->
			<List
				id="list"
				width="auto"
				class="sapFDynamicPageAlignContent"
				items="{
					path: '/Objects',
					sorter: {
						path: 'Name',
						descending: false
					},
					groupHeaderFactory: '.createGroupHeader'
				}"
				busyIndicatorDelay="{masterView>/delay}"
				noDataText="{masterView>/noDataText}"
				mode="{= ${device>/system/phone} ? 'None' : 'SingleSelectMaster'}"
				growing="true"
				growingScrollToLoad="true"
				updateFinished=".onUpdateFinished"
				selectionChange=".onSelectionChange">
				<infoToolbar>
					<Toolbar
						active="true"
						id="filterBar"
						visible="{masterView>/isFilterBarVisible}"
						press=".onOpenViewSettings">
						<Title
							id="filterBarLabel"
							text="{masterView>/filterBarLabel}"
							level="H3"/>
					</Toolbar>
				</infoToolbar>
				<headerToolbar>
					<OverflowToolbar>
						<SearchField
							id="searchField"
							showRefreshButton="true"
							tooltip="{i18n>masterSearchTooltip}"
							search=".onSearch"
							width="auto">
							<layoutData>
								<OverflowToolbarLayoutData
									minWidth="150px"
									maxWidth="240px"
									shrinkable="true"
									priority="NeverOverflow"/>
							</layoutData>
						</SearchField>
						<ToolbarSpacer/>
						<Button
							id="sortButton"
							press=".onOpenViewSettings"
							icon="sap-icon://sort"
							type="Transparent"/>
						<Button
							id="filterButton"
							press=".onOpenViewSettings"
							icon="sap-icon://filter"
							type="Transparent"/>
						<Button
							id="groupButton"
							press=".onOpenViewSettings"
							icon="sap-icon://group-2"
							type="Transparent"/>
					</OverflowToolbar>
				</headerToolbar>
				<items>
					<ObjectListItem
						type="Navigation"
						press=".onSelectionChange"
						title="{Name}"
						number="{
							path: 'UnitNumber',
							formatter: '.formatter.currencyValue'
						}"
						numberUnit="{UnitOfMeasure}">
					</ObjectListItem>
				</items>
			</List>
		</semantic:content>
	</semantic:SemanticPage>
</mvc:View>