From: Roland Haeder Date: Mon, 31 Aug 2015 09:43:31 +0000 (+0200) Subject: updated jshop + renamed some form fields due to jshop change X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e9f9d9381dcb49429f147a8f0b5dd77bff4759a4;p=pizzaservice-war.git updated jshop + renamed some form fields due to jshop change Signed-off-by:Roland Häder --- diff --git a/lib/jshop.jar b/lib/jshop.jar index e0179deb..63867a35 100644 Binary files a/lib/jshop.jar and b/lib/jshop.jar differ diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index 818b6735..233163c5 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -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 { diff --git a/web/static/admin/admin_parent_category_selection_box.jsp b/web/static/admin/admin_parent_category_selection_box.jsp index 75fb2ba9..eb98e8de 100644 --- a/web/static/admin/admin_parent_category_selection_box.jsp +++ b/web/static/admin/admin_parent_category_selection_box.jsp @@ -9,7 +9,7 @@ <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> -