]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Renamed controller method (still no clue, how this should work) + updated jcore...
authorRoland Haeder <roland@mxchange.org>
Wed, 9 Sep 2015 10:02:40 +0000 (12:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 9 Sep 2015 10:02:40 +0000 (12:02 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcore-ee-logger.jar
src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java
src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebController.java
web/index.xhtml

index 6a5ff51e99f32a7569a071da9273c33111266a92..3e788337a890557ed0c1448c736d39a5d5ed6013 100644 (file)
Binary files a/lib/jcore-ee-logger.jar and b/lib/jcore-ee-logger.jar differ
index 9c5875d5512ca9b87768c502b014c656672673bc..9d76d3d9361ba0c64601e0e528afcbe95545a963 100644 (file)
@@ -55,11 +55,11 @@ public class AdminCategoryWebBean extends BaseFrameworkBean implements AdminCate
                InitialContext context = new InitialContext();
 
                // Try to lookup the bean
-               this.category = (CategorySessionBeanRemote) context.lookup("ejb/stateless-product"); //NOI18N
+               this.category = (CategorySessionBeanRemote) context.lookup("ejb/stateless-category"); //NOI18N
        }
 
        @Override
-       public void doAdminAddCategory (final Category category) throws FaceletException {
+       public void addCategory (final Category category) throws FaceletException {
                try {
                        // Deligate to bean
                        this.category.doAdminAddCategory(category);
index c38dcdb56b4c138d929a6f38364fdb748fe3f7ec..934c2dc3c8c08b9a1ef53b515666d4b3f4d553e1 100644 (file)
@@ -32,5 +32,5 @@ public interface AdminCategoryWebController {
         * @param category Category instance
         * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
         */
-       public void doAdminAddCategory (final Category category) throws FaceletException;
+       public void addCategory (final Category category) throws FaceletException;
 }
index c8885c1e8c73e53ac95ec546bbac196cb544eccf..c7f13834f3a419a6b7dd47fd74713bccf4ca9074 100644 (file)
                        </h:panelGrid>
                        //-->
 
-                       <h:form acceptcharset="utf-8" id="add_item">
-                               <table class="basket_item_table">
-                                       <thead>
-                                               <tr>
-                                                       <th colspan="5" class="table_header">
-                                                               Folgendes kann bestellt werden:
-                                                       </th>
-                                               </tr>
-
-                                               <tr>
-                                                       <th class="table_header_column">
-                                                               Bestellen?
-                                                       </th>
-
-                                                       <th class="table_header_column">
-                                                               Anzahl:
-                                                       </th>
-
-                                                       <th class="table_header_column">
-                                                               Produkt:
-                                                       </th>
-
-                                                       <th class="table_header_column">
-                                                               Einzelpreis:
-                                                       </th>
-
-                                                       <th class="table_header_column">
-                                                               Zwischensumme:
-                                                       </th>
-                                               </tr>
-                                       </thead>
-
-                                       <tbody>
-                                               <ui:repeat var="product" value="#{controller.availableProducts}">
+                       <table class="basket_item_table">
+                               <thead>
+                                       <tr>
+                                               <th colspan="5" class="table_header">
+                                                       Folgendes kann bestellt werden:
+                                               </th>
+                                       </tr>
+
+                                       <tr>
+                                               <th class="table_header_column">
+                                                       Bestellen?
+                                               </th>
+
+                                               <th class="table_header_column">
+                                                       Anzahl:
+                                               </th>
+
+                                               <th class="table_header_column">
+                                                       Produkt:
+                                               </th>
+
+                                               <th class="table_header_column">
+                                                       Einzelpreis:
+                                               </th>
+
+                                               <th class="table_header_column">
+                                                       Zwischensumme:
+                                               </th>
+                                       </tr>
+                               </thead>
+
+                               <tbody>
+                                       <ui:repeat var="product" value="#{controller.availableProducts}">
+                                               <h:form acceptcharset="utf-8" id="add_item">
 
                                                        <f:viewAction action="#{basket.setCurrentProduct(product)}" />
 
@@ -75,7 +75,7 @@
                                                                        </td>
 
                                                                        <td class="table_data_column">
-                                                                               #{basket.item.amount}
+                                                                               #{basket.currentItem.amount}
                                                                        </td>
 
                                                                        <td class="table_data_column">
@@ -89,7 +89,7 @@
                                                                        </td>
 
                                                                        <td class="table_data_column" align="right">
-                                                                               <h:outputText class="price" value="#{basket.item.calculateTotalPrice()}">
+                                                                               <h:outputText class="price" value="#{controller.calculateTotalPrice(basket.currentItem)}">
                                                                                        <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
                                                                                </h:outputText>
                                                                        </td>
                                                                        </td>
                                                                </tr>
                                                        </ui:fragment>
-                                               </ui:repeat>
-                                       </tbody>
-                               </table>
-                       </h:form>
+                                               </h:form>
+                                       </ui:repeat>
+                               </tbody>
+                       </table>
                </ui:define>
 
                <ui:define name="footer">