<?xml version="1.0" encoding="utf-8" ?>
<c:Screen xmlns:c="BitMobile.Controls" xmlns:s="BitMobile.ValueStack">

	<s:If Test="$param3 == null">
		<s:Push Id="items" Value="$Facade.GetLookupList($param1,$param2)"></s:Push>
	</s:If>
	<s:If Test="$param3=='Order'">
		<s:Push Id="items" Value="$Facade.GetpriceLists($workflow.order.Outlet)"></s:Push>
	</s:If>
	<s:If Test="$param3=='Visit_Questions'">
		<s:Push Id="items" Value="$Facade.GetValueList($param1)"></s:Push>
	</s:If>
	<s:If Test="$param3=='Outlet_Parameters'">
		<s:Push Id="items" Value="$Facade.GetParameterValueList($param1)"></s:Push>
	</s:If>


	<c:DockLayout>

		<c:HorizontalLayout CssClass="bottom_btn" OnEvent="Back" OnClickAction="$Workflow.DoBack()">
			<c:TextView Text="#ready#"></c:TextView>
		</c:HorizontalLayout>
		<c:HorizontalLine CssClass="b_line" />

		<c:HorizontalLayout CssClass="caption_grid">
			<c:TextView Text="#select_answer#"></c:TextView>
		</c:HorizontalLayout>
		<c:HorizontalLine />

		<c:ScrollView Id="grScrollView">

			<s:Iterator Id="item" Value="$items">

				<s:If Test="$param3 == null">
					<s:Push Id="itemId" Value="$item.Id"></s:Push>
				</s:If>
				<s:If Test="$param3=='Order'">
					<s:If Test="$defaultPriceLists==0">
						<s:Push Id="itemId" Value="$item.PriceListAsObject.Id"></s:Push>
					</s:If>
					<s:Else>
						<s:Push Id="itemId" Value="$item.Id"></s:Push>
					</s:Else>
				</s:If>
				<s:If Test="$param3=='Visit_Questions'">
					<s:Push Id="itemId" Value="$item"></s:Push>
				</s:If>
				<s:If Test="$param3=='Outlet_Parameters'">
					<s:Push Id="itemId" Value="$item"></s:Push>
				</s:If>

				<c:DockLayout CssClass="parameter_grid" OnClickAction="$Facade.UpdateValueAndBack($param1,$param2,$itemId)">
					<s:If Test="$param3 == null">
						<c:TextView Text="$item.Description"></c:TextView>
					</s:If>
					<s:If Test="$param3=='Order'">
						<s:If Test="$defaultPriceLists==0">
							<c:TextView Text="$item.PriceListAsObject.Description"></c:TextView>
						</s:If>
						<s:Else>
							<c:TextView Text="$item.Description"></c:TextView>
						</s:Else>
					</s:If>
					<s:If Test="$param3=='Visit_Questions'">
						<c:TextView Text="$item.Value"></c:TextView>
					</s:If>
					<s:If Test="$param3=='Outlet_Parameters'">
						<c:TextView Text="$item.Value"></c:TextView>
					</s:If>
					<c:Image></c:Image>
				</c:DockLayout>
				<c:HorizontalLine />

			</s:Iterator>

		</c:ScrollView>

	</c:DockLayout>

</c:Screen>



