<mvc:View
	controllerName="mycompany.myapp.MyWorklistApp.controller.Worklist"
	xmlns="sap.m"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns:semantic="sap.f.semantic">

	<semantic:SemanticPage
		id="page"
		headerPinnable="false"
		toggleHeaderOnTitleClick="false">

		<semantic:titleHeading>
			<Title text="{i18n>worklistTitle}" />
		</semantic:titleHeading>

		<semantic:content>
			<Table
				id="table"
				width="auto"
				items="{
					path: '/Products',
					sorter: {
						path: 'ProductName',
						descending: false
					}
				}"
				noDataText="{worklistView>/tableNoDataText}"
				busyIndicatorDelay="{worklistView>/tableBusyDelay}"
				growing="true"
				growingScrollToLoad="true"
				updateFinished=".onUpdateFinished">

				<headerToolbar>
					<Toolbar>
						<Title id="tableHeader" text="{worklistView>/worklistTableTitle}"/>
						<ToolbarSpacer />
						<SearchField
							id="searchField"
							tooltip="{i18n>worklistSearchTooltip}"
							search=".onSearch"
							width="auto">
						</SearchField>
					</Toolbar>
				</headerToolbar>

				<columns>
					<Column id="nameColumn">
						<Text text="{i18n>tableNameColumnTitle}" id="nameColumnTitle"/>
					</Column>
					<Column id="unitNumberColumn" hAlign="End">
						<Text text="{i18n>tableUnitNumberColumnTitle}" id="unitNumberColumnTitle"/>
					</Column>
				</columns>

				<items>
					<ColumnListItem
						type="Navigation"
						press=".onPress">
						<cells>
							<ObjectIdentifier
								title="{ProductName}"/>
							<ObjectNumber
								number="{
									path: 'UnitsInStock',
									formatter: '.formatter.numberUnit'
								}"/>
						</cells>
					</ColumnListItem>
				</items>
			</Table>
		</semantic:content>

		<semantic:sendEmailAction>
			<semantic:SendEmailAction id="shareEmail" press=".onShareEmailPress"/>
		</semantic:sendEmailAction>

	</semantic:SemanticPage>

</mvc:View>