Commit a0290f82 by Riku Silvola

foodwave list

1 parent dd9ffa70
......@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools">
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave">
<composite:interface>
......@@ -20,61 +20,12 @@
</div>
<h:dataTable styleClass="bordertable" id="billcart" value="#{cc.attrs.items}" var="cart">
<h:column>
<f:facet name="header">
<h:outputText id="name" value="${i18n['product.name']}" />
</f:facet>
<h:outputText value="#{cart.product.name}" />
<foodwave:list
selectaction="#{foodWaveView.selectFoodView}"
items="#{foodWaveView.foodWaves}"
commitValue="#{i18n['food']}"
/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['product.price']}" />
</f:facet>
<h:outputText id="price" value="#{cart.product.price.abs()}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['product.totalPrice']}" />
</f:facet>
<h:outputText id="total" value="#{cart.price}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText id="count" value="${i18n['product.cart.count']}" />
</f:facet>
<h:commandButton action="#{foodShopView.addMinusTen}" value="#{i18n['productshop.minusTen']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{foodShopView.addMinusOne}" value="#{i18n['productshop.minusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:inputText size="4" id="cartcount" value="#{cart.count}">
<f:ajax render="@form" event="valueChange" />
</h:inputText>
<h:commandButton action="#{foodShopView.addOne}" value="#{i18n['productshop.plusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{foodShopView.addTen}" value="#{i18n['productshop.plusTen']}">
<f:ajax render="@form" />
</h:commandButton>
</h:column>
<h:column>
<h:dataTable border="0" var="disc" value="#{cart.discounts}">
<h:column>
<h:outputText value="#{disc.shortdesc}" />
</h:column>
<h:column>
<h:outputText value="#{cart.getDiscount(disc.id)}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText>
</h:column>
</h:dataTable>
</h:column>
</h:dataTable>
<div>
<h:outputText value="#{i18n['productshop.total']} " />
......
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools">
<composite:interface>
<composite:attribute name="items" required="true" />
<!-- <composite:attribute name="selectValue" required="true" /> -->
<composite:attribute name="selectaction" method-signature="java.lang.String action()" required="true" />
</composite:interface>
<composite:implementation>
<!-- <h:outputScript target="head" library="script" name="jquery.min.js" /> -->
<!-- <h:outputScript target="head" library="script" name="shopscript.js" /> -->
<h:outputScript library="primefaces" name="jquery/jquery.js" />
<div style="margin-top: 5px;">
<h:commandButton action="#{cc.attrs.selectaction}" id="selectbutton-top" value="#{cc.attrs.selectValue}" />
</div>
<h:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign" styleClass="bordertable" id="billcart" value="#{cc.attrs.items}" var="foodwave">
<h:column>
<f:facet name="header">
<h:outputText id="name" value="${i18n['foodWave.name']}" />
</f:facet>
<h:outputText value="#{foodwave.template.name}" />
</h:column>
<h:column >
<f:facet name="header">
<h:outputText value="${i18n['foodWave.description']}" />
</f:facet>
<h:outputText id="description" value="#{foodwave.template.description}" />
</h:column>
<h:commandButton action="#{cc.attrs.selectaction}" id="selectbutton-botton" value="#{cc.attrs.selectValue}" />
</h:dataTable>
</composite:implementation>
</html>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!