1 <?xml version="1.0" encoding="UTF-8" ?>
3 xmlns="http://www.w3.org/1999/xhtml"
4 xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
5 xmlns:h="http://xmlns.jcp.org/jsf/html"
6 xmlns:f="http://xmlns.jcp.org/jsf/core"
10 <div class="table_header">
11 <h:outputText value="#{msg.FOLLOWING_PRODUCTS_ARE_AVAILABLE}" />
15 <h:dataTable id="table_show_available_products" var="product" value="#{productController.availableProducts}" styleClass="table" summary="#{msg.TABLE_SUMMARY_INDEX_PRODUCTS}">
17 <div id="main_item_container">
18 <div class="item_title">
19 <h:outputText value="#{product.productTitle}" />
22 <div class="item_content">
23 <div class="table_left">
24 <div class="item_actions">
25 <ui:fragment rendered="#{!basketController.isProductAdded(product)}">
26 <h:form id="add_item">
27 <h:commandButton class="submit" id="add" value="#{msg.USER_ADD_ITEM_TO_BASKET}" action="#{basketController.addItem(product)}" title="#{msg.BUTTON_TITLE_ADD_ITEM_TO_BASKET}" />
29 <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{basketController.orderedAmount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
31 If the customer wants to order more, he need to call in.
33 <f:validator for="amount" validatorId="ItemAmountValidator" />
38 <ui:fragment rendered="#{basketController.isProductAdded(product)}">
39 <div class="item_amount">
40 <h:outputText value="#{msg.ITEM_ORDER_AMOUNT}" />
41 <h:outputText value="#{basketController.getItemAmount(product)}" />
44 <div class="item_basket_link">
45 <h:link outcome="basket" title="#{msg.LINK_TO_BASKET_TITLE}" value="#{msg.LINK_CHANGE_IN_BASKET}" />
48 <div class="clear"></div>
53 <div class="table_right">
54 <div class="item_price">
55 <h:outputText value="#{msg.SINGLE_PRODUCT_PRICE}" />
56 <h:outputText styleClass="price" value="#{product.productPrice}">
57 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
61 <div class="item_total_price">
62 <h:outputText value="#{msg.TOTAL_ITEM_PRICE}" />
63 <h:outputText styleClass="price" value="#{msg.ITEM_NOT_ORDERED}" rendered="#{!basketController.isProductAdded(product)}" />
64 <h:outputText styleClass="price" value="#{basketController.calculateCurrentItemPrice()}" rendered="#{basketController.isProductAdded(product)}">
65 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
70 <div class="clear"></div>
76 <div id="totals_container">
77 <h:outputText value="#{msg.TOTAL_ORDER_PRICE}" />
78 <h:outputText styleClass="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
79 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />