From cae2ae05ef7aa703d19a4f4a17df4300e99fc4ce Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 28 Aug 2015 11:24:10 +0200 Subject: [PATCH] =?utf8?q?Again=20lesser=20scriptlets=20+=20added=20initia?= =?utf8?q?lization=20of=20controller=20bean=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../application/PizzaServiceApplication.java | 2 +- .../pizzaapplication/category/BaseCategory.java | 2 +- .../pizzaapplication/category/Category.java | 2 +- web/admin/category.jsp | 14 +++++++++----- web/admin/product.jsp | 3 +++ web/static/admin/admin_category_selection_box.jsp | 2 +- .../admin/admin_parent_category_selection_box.jsp | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index ff05279f..eb222f5f 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -1370,7 +1370,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P String title = null; try { // Now get title from it and return it - title = category.decodedTitle(); + title = category.getDecodedTitle(); } catch (final UnsupportedEncodingException ex) { // Continue to throw as cause throw new ServletException(ex); diff --git a/src/java/org/mxchange/pizzaapplication/category/BaseCategory.java b/src/java/org/mxchange/pizzaapplication/category/BaseCategory.java index 208cfb68..89978d6d 100644 --- a/src/java/org/mxchange/pizzaapplication/category/BaseCategory.java +++ b/src/java/org/mxchange/pizzaapplication/category/BaseCategory.java @@ -100,7 +100,7 @@ public class BaseCategory extends BaseFrameworkSystem implements Category { * @return Decoded title */ @Override - public final String decodedTitle () throws UnsupportedEncodingException { + public final String getDecodedTitle () throws UnsupportedEncodingException { // Get title byte[] t = this.getTitle().getBytes(); diff --git a/src/java/org/mxchange/pizzaapplication/category/Category.java b/src/java/org/mxchange/pizzaapplication/category/Category.java index a4cfc318..c7248f53 100644 --- a/src/java/org/mxchange/pizzaapplication/category/Category.java +++ b/src/java/org/mxchange/pizzaapplication/category/Category.java @@ -76,5 +76,5 @@ public interface Category extends Storeable, Comparable { * @return Decoded title * @throws java.io.UnsupportedEncodingException If the encoding UTF-8 is not supported */ - public String decodedTitle () throws UnsupportedEncodingException ; + public String getDecodedTitle () throws UnsupportedEncodingException ; } diff --git a/web/admin/category.jsp b/web/admin/category.jsp index 3742aa13..b9a0bd40 100644 --- a/web/admin/category.jsp +++ b/web/admin/category.jsp @@ -13,11 +13,15 @@ <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +<%controller.init();%> + - + Pizza-Service - Kategorien @@ -37,7 +41,7 @@
-
+ @@ -54,13 +58,13 @@ - +
- ${category.decodedTitle()} + ${category.decodedTitle} ${app.generateLinkForParent(category)} @@ -81,7 +85,7 @@
- +
Neue Kategorie hinzufügen: diff --git a/web/admin/product.jsp b/web/admin/product.jsp index 09b79b4e..c8192815 100644 --- a/web/admin/product.jsp +++ b/web/admin/product.jsp @@ -16,6 +16,9 @@ <%@page import="org.mxchange.pizzaapplication.database.frontend.product.ProductFrontend"%> + +<%controller.init();%> + diff --git a/web/static/admin/admin_category_selection_box.jsp b/web/static/admin/admin_category_selection_box.jsp index 52a0d335..a125fd69 100644 --- a/web/static/admin/admin_category_selection_box.jsp +++ b/web/static/admin/admin_category_selection_box.jsp @@ -12,6 +12,6 @@ diff --git a/web/static/admin/admin_parent_category_selection_box.jsp b/web/static/admin/admin_parent_category_selection_box.jsp index 7d118ec9..7dae1c08 100644 --- a/web/static/admin/admin_parent_category_selection_box.jsp +++ b/web/static/admin/admin_parent_category_selection_box.jsp @@ -13,6 +13,6 @@ -- 2.39.5