]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
updated jshop + renamed some form fields due to jshop change
authorRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 09:43:31 +0000 (11:43 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 09:44:16 +0000 (11:44 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jshop.jar
src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java
web/static/admin/admin_parent_category_selection_box.jsp

index e0179deb3401947f1176332a70f5a40ef332f019..63867a3568abaeafb02c3ddeac202c43e73837f2 100644 (file)
Binary files a/lib/jshop.jar and b/lib/jshop.jar differ
index 818b6735e4642b2e949828dc805c0f9e2016d077..233163c5e22b4f2e0c3d6ef0660cf3ac56b51575 100644 (file)
@@ -480,10 +480,10 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
                // Get all fields
                String title = request.getParameter(CategoryFrontend.COLUMN_TITLE);
-               String parent = request.getParameter(CategoryFrontend.COLUMN_PARENT);
+               String parentId = request.getParameter(CategoryFrontend.COLUMN_PARENT);
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("title={0},parent={1}", title, parent)); //NOI18N
+               this.getLogger().debug(MessageFormat.format("title={0},parentId={1}", title, parentId)); //NOI18N
 
                // Init variables for casting
                Integer id = 0;
@@ -495,10 +495,10 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                } else if (title.isEmpty()) {
                        // Is left empty
                        throw new IllegalArgumentException(MessageFormat.format("{0} is empty.", CategoryFrontend.COLUMN_TITLE)); //NOI18N
-               } else if ((parent != null) && (!parent.isEmpty())) {
+               } else if ((parentId != null) && (!parentId.isEmpty())) {
                        // "parent" is set, so check it
                        try {
-                               id = Integer.parseInt(parent);
+                               id = Integer.parseInt(parentId);
                        } catch (final NumberFormatException e) {
                                // Not valid number
                                throw new IllegalArgumentException(e);
@@ -541,11 +541,11 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                // Get title, price and category id
                String title = request.getParameter(ProductFrontend.COLUMN_TITLE);
                String price = request.getParameter(ProductFrontend.COLUMN_PRICE);
-               String category = request.getParameter(ProductFrontend.COLUMN_CATEGORY);
+               String categoryId = request.getParameter(ProductFrontend.COLUMN_CATEGORY);
                String available = request.getParameter(ProductFrontend.COLUMN_AVAILABLE);
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("title={0},price={1},category={2},available={3}", title, price, category, available)); //NOI18N
+               this.getLogger().debug(MessageFormat.format("title={0},price={1},categoryId={2},available={3}", title, price, categoryId, available)); //NOI18N
 
                // Variables for converting
                Long id = null;
@@ -564,10 +564,10 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                } else if (price.isEmpty()) {
                        // Is left empty
                        throw new IllegalArgumentException(MessageFormat.format("{0} is empty.", ProductFrontend.COLUMN_PRICE)); //NOI18N
-               } else if (null == category) {
+               } else if (null == categoryId) {
                        // "title" not set
                        throw new IllegalArgumentException(MessageFormat.format("{0} is not set.", ProductFrontend.COLUMN_CATEGORY)); //NOI18N
-               } else if (category.isEmpty()) {
+               } else if (categoryId.isEmpty()) {
                        // Is left empty
                        throw new IllegalArgumentException(MessageFormat.format("{0} is empty.", ProductFrontend.COLUMN_CATEGORY)); //NOI18N
                } else if (null == available) {
@@ -583,7 +583,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
 
                // Parse numbers
                try {
-                       id = Long.parseLong(category);
+                       id = Long.parseLong(categoryId);
                        p = Float.parseFloat(price);
                } catch (final NumberFormatException e) {
                        // Not valid number
@@ -619,7 +619,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
        @Override
        public String generateLinkForParent (final Category category) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
+               this.getLogger().trace(MessageFormat.format("categoryId={0} - CALLED!", category)); //NOI18N
 
                // category must not be null
                if (null == category) {
@@ -628,12 +628,12 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
 
                // Get parent id
-               Long parent = category.getParent();
+               Long parentId = category.getParentId();
 
                // Is the id set?
-               if (parent > 0) {
+               if (parentId > 0) {
                        // Product HTML code for link
-                       throw new UnsupportedOperationException(MessageFormat.format("parent={0} - Unfinished!", parent)); //NOI18N
+                       throw new UnsupportedOperationException(MessageFormat.format("parentId={0} - Unfinished!", parentId)); //NOI18N
                }
 
                // No parent set
@@ -662,7 +662,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P
                }
 
                // Debug message
-               this.getLogger().debug(MessageFormat.format("category={0}", category)); //NOI18N
+               this.getLogger().debug(MessageFormat.format("categoryId={0}", category)); //NOI18N
 
                String title = null;
                try {
index 75fb2ba911c23d3acf6b7cf6483517cf7c398d42..eb98e8defe4e556c536d06095b39bb1bce723e74 100644 (file)
@@ -9,7 +9,7 @@
 <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
 
-<select class="select" name="parent" size="1">
+<select class="select" name="parentId" size="1">
        <option value="">Ist oberste Kategorie</option>
        <c:forEach var="category" items="${controller.allCategories}">
                <option value="${category.categoryId}">${category.decodedTitle}</option>