<core:FragmentDefinition
	xmlns="sap.m"
	xmlns:core="sap.ui.core">
	<TableSelectDialog
		noDataText="No Products Found"
		title="Select Product"
		search=".handleSearch"
		confirm=".handleValueHelpClose"
		cancel=".handleValueHelpClose"
		showClearButton="true"
		items="{
			path : '/ProductCollection',
			sorter : {
				path : 'Name',
				descending : false
			}
		}">
		<ColumnListItem selected="{selected}">
			<cells>
				<ObjectIdentifier title="{Name}" text="{ProductId}" />
				<Text text="{SupplierName}" />
				<Text text="{Width} x {Depth} x {Height} {DimUnit}" />
				<ObjectNumber
					number="{WeightMeasure}"
					unit="{WeightUnit}"
					state="{
						path: 'WeightMeasure',
						formatter: 'sap.m.sample.TableSelectDialog.Formatter.weightState'
					}" />
				<ObjectNumber
					number="{
						parts:[{path:'Price'},{path:'CurrencyCode'}],
						type: 'sap.ui.model.type.Currency',
						formatOptions: {showMeasure: false}
					}"
					unit="{CurrencyCode}" />
			</cells>
		</ColumnListItem>
		<columns>
			<Column width="12em">
				<header>
					<Text text="Product" />
				</header>
			</Column>
			<Column minScreenWidth="Tablet" demandPopin="true">
				<header>
					<Text text="Supplier" />
				</header>
			</Column>
			<Column
				minScreenWidth="Desktop"
				demandPopin="true"
				hAlign="End">
				<header>
					<Text text="Dimensions" />
				</header>
			</Column>
			<Column
				minScreenWidth="Desktop"
				demandPopin="true"
				hAlign="Center">
				<header>
					<Text text="Weight" />
				</header>
			</Column>
			<Column hAlign="End">
				<header>
					<Text text="Product" />
				</header>
			</Column>
		</columns>
	</TableSelectDialog>
</core:FragmentDefinition>