]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
jshop now no longer provides the BasketBean instance in BaseFrameworkBean class ...
authorRoland Haeder <roland@mxchange.org>
Wed, 2 Sep 2015 13:24:53 +0000 (15:24 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 2 Sep 2015 13:24:53 +0000 (15:24 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jshop.jar
web/WEB-INF/templates/guest/guest_footer.tpl
web/WEB-INF/templates/guest/guest_menu.tpl
web/index.xhtml

index efd0b4a5a26aceeb18a42a069978bb1371574c64..634266a87f064b195a309f34687e998c4305b00d 100644 (file)
Binary files a/lib/jshop.jar and b/lib/jshop.jar differ
index a3c9ec7e6911fedd39f0a621d2ebba48c745c22e..6462748197961bfb9a971c76284f488815317842 100644 (file)
@@ -5,10 +5,10 @@
        xmlns:ui="http://java.sun.com/jsf/facelets">
        <div class="footer">
                <ul class="footer_nav">
-                       <li><a href="${basePath}/">Home</a></li>
-                       <li><a href="${basePath}/imprint.jsp">Impressum</a></li>
-                       <li><a href="${basePath}/terms.jsp">AGBs</a></li>
-                       <li><a href="${basePath}/privacy.jsp">Datenschutz</a></li>
+                       <li><h:link outcome="index" value="Home" /></li>
+                       <li><h:link outcome="imprint" value="Impressum" /></li>
+                       <li><h:link outcome="terms" value="AGBs" /></li>
+                       <li><h:link outcome="privacy" value="Datenschutz" /></li>
                </ul>
        </div>
 
index cf2ebcf8f3225cec4034ae5a063b84fe5c4b8e3c..cfaaae027208fa76b6c2ede6bd8071b7a9bee6ad 100644 (file)
@@ -4,16 +4,22 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets">
        <div class="menu">
+               <div class="menu_header">
+                       Home
+               </div>
                <ul>
-                       <li><a href="${basePath}/" title="Eingangsseite">Home</a></li>
-                       <li><a href="${basePath}/basket.jsp" title="Zum Warenkorb">Zum Warenkorb</a></li>
-                       <li><a href="${basePath}/bye.jsp" title="Sitzung beennden">Sitzung beenden</a></li>
+                       <li><h:link title="Eingangsseite" outcome="index" value="Home" /></li>
+                       <li><h:link title="Zum Warenkorb" outcome="basket" value="Zum Warenkorb" /></li>
+                       <li><h:link title="Sitzung beennden" outcome="bye" value="Sitzung beenden" /></li>
                </ul>
 
+               <div class="menu_header">
+                       Kundenlogin
+               </div>
                <ul>
-                       <li><a href="${basePath}/customer/login.jsp" title="Login für bestehende Kunden">Einloggen</a></li>
-                       <li><a href="${basePath}/customer/register.jsp" title="Anmeldung als neuer Kunde">Neuer Kunde</a></li>
-                       <li><a href="${basePath}/customer/lost_passwd.jsp" title="Neues Passwort erstellen">Passwort vergessen?</a></li>
+                       <li><h:link title="Login für bestehende Kunden" outcome="customer_login" value="Einloggen" /></li>
+                       <li><h:link title="Anmeldung als neuer Kunde" outcome="customer_register" value="Neuer Kunde" /></li>
+                       <li><h:link title="Neues Passwort erstellen" outcome="customer_lost_passwd" value="Passwort vergessen?" /></li>
                </ul>
        </div>
 </ui:composition>
index e87f1813ad39eebfebe722d11488fb873e37148f..08cf9c6338421137c4be46bc7cdd2f44d415a975 100644 (file)
@@ -7,8 +7,6 @@
          xmlns:f="http://xmlns.jcp.org/jsf/core"
          >
 
-       <c:set var="basePath" value="#{request.contextPath}" />
-
        <!--
        TODO: Not used:
        xmlns:basket="http://mxchange.org/jshop/tags/basket"
@@ -30,7 +28,7 @@
                        TODO Not used!
                        <basket:mini_basket basket="#{basket}" />
 
-                       <h:panelGrid class="table" columnClasses="table_data_column" headerClass="table_header_column">
+                       <h:panelGrid class="basket_item_table" columnClasses="table_data_column" headerClass="table_header_column">
                                <f:facet name="header">
                                        Bestellen? Bestellmenge: Produkt: Einzelpreis:
                                </f:facet>
 
                                        <tbody>
                                                <ui:repeat var="product" value="#{controller.availableProducts}">
-                                                       <c:set var="isAdded" value="#{controller.basket.isAdded(product)}" />
+                                                       <!-- Cache isAdded call to reduce calls //-->
+                                                       <c:set var="isAdded" value="#{basket.isAdded(product)}" />
 
                                                        <ui:fragment rendered="#{isAdded == true}">
                                                                <tr>
                                                                        <td class="table_data_column">
-                                                                               <h:link value="basket.xhtml" title="Zum Warenkorb">Warenkorb</h:link>
+                                                                               <h:link outcome="basket" title="Zum Warenkorb" value="Warenkorb" />
                                                                        </td>
 
                                                                        <td class="table_data_column">
-                                                                               #{controller.basket.item.amount}
+                                                                               #{basket.item.amount}
                                                                        </td>
 
                                                                        <td class="table_data_column">
                                                                        </td>
 
                                                                        <td class="table_data_column" align="right">
-                                                                               <h:outputText class="price" value="#{controller.basket.item.calculateTotalPrice()}">
+                                                                               <h:outputText class="price" value="#{basket.item.calculateTotalPrice()}">
                                                                                        <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
                                                                                </h:outputText>
                                                                        </td>
                                                                </tr>
                                                        </ui:fragment>
+
                                                        <ui:fragment rendered="#{isAdded == false}">
                                                                <tr>
                                                                        <td class="table_data_column">
-                                                                               <h:commandButton class="submit" id="add" value="Hinzufügen" action="#{controller.basket.addToBasket(product)}" />
+                                                                               <h:commandButton class="submit" id="add" value="Hinzufügen" action="#{basket.addToBasket(product)}" />
                                                                                <h:inputHidden id="itemId" value="#{product.itemId}" />
                                                                                <h:inputHidden id="itemType" value="Product" />
                                                                        </td>