<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
<%@ taglib prefix="jdt" uri="http://www.jenia.org/jsf/dataTools" %>

<html>
<%@include file="/paginas/comum/head.jsp" %>
<body>
<f:view>
<%@include file="/paginas/comum/cabecalho.jsp" %>

<f:verbatim>
<style type="text/css">
	.colunaIngredientes {
		width: 200px;
	}
</style>
</f:verbatim>

<h1>Pizzas Tradicionais</h1>

<h:form id="formAdicionarPizza">
	<p>
	<h:commandButton id="adicionarPizza" value="Adicionar Pizzas Selecionadas ao Pedido"
		action="#{pizzasTradicionaisControlador.adicionaPizzaAoPedido}"/>
	</p>	
<t:dataTable id="tabelaDeCategoriasDeIngredientes" 
	var="pizzasTradicionais" 
	value="#{pizzasTradicionaisControlador.pizzasTradicionais}">
				
	<h:column>			 											
		<t:dataTable id="tabelaDeIngredientes"
			var="ingrediente" value="#{pizzasTradicionais.ingredientes}"
			headerClass="tabelaCabecalho"
			footerClass="tabelaRodape"
			columnClasses="colunaIngredientes"
			rowClasses="tabelaLinha1,tabelaLinha2"
			rowOnMouseOver="tabelaMouseOver(this)"
			rowOnMouseOut="tabelaMouseOut(this)">
			
			<h:column> 				
				<f:facet name="header">
					<h:panelGroup>					
					<jdt:multipleRowsSelector id="listaPizzasTradicionais" selectionList="#{pizzasTradicionaisControlador.pizzasTradicionaisSelecionadas}" />
					<h:outputText value="#{pizzasTradicionais.nome} --> " />
					<h:outputText value="#{pizzasTradicionais.precoDouble}">
								<f:convertNumber minFractionDigits="2" groupingUsed="true"
									maxIntegerDigits="14" type="currency" currencySymbol="R$" />
							</h:outputText>
					</h:panelGroup>					
				</f:facet>
				
				<h:outputText value="#{ingrediente.nome}"/>
			</h:column>
		</t:dataTable>
	</h:column>
</t:dataTable>
</h:form>		
</f:view>
<%@include file="/paginas/comum/rodape.jsp" %>
</body>
</html>