From 22c468846e5a876fa94955c7db733b7f73ffc05f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 10 Aug 2015 11:50:12 +0200 Subject: [PATCH] =?utf8?q?Fixed=20form=20field=20name=20which=20must=20be?= =?utf8?q?=20equal=20to=20class'=20attribute's=20name=20and=20public=20get?= =?utf8?q?ter=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- web/finished.jsp | 2 +- web/form_handler/order.jsp | 6 ++++-- web/preview.jsp | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web/finished.jsp b/web/finished.jsp index 012a8282..0339ebe6 100644 --- a/web/finished.jsp +++ b/web/finished.jsp @@ -127,7 +127,7 @@ - + <% Iterator> fieldIterator = customer.iterator(); %> diff --git a/web/form_handler/order.jsp b/web/form_handler/order.jsp index 926b2e58..55539f02 100644 --- a/web/form_handler/order.jsp +++ b/web/form_handler/order.jsp @@ -9,6 +9,7 @@ <%@page import="java.lang.reflect.Field"%> <%@page import="java.util.Map"%> <%@page import="java.util.Iterator"%> +<%@page import="java.text.MessageFormat"%> <%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %> <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%> <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%> @@ -21,15 +22,16 @@ PizzaApplication app = PizzaServiceApplication.getInstance(application); // Is it post? - if ("POST".equals(request.getMethod())) { + if ("POST".equals(request.getMethod())) { //NOI18N // Is POST, so continue with handling Iterator> fieldIterator = customer.iterator(); while (fieldIterator.hasNext()) { + // Get next field Map.Entry entry = fieldIterator.next(); // Debug message - app.getLogger().debug("entry " + entry.getKey() + "=" + entry.getValue()); + app.getLogger().debug(MessageFormat.format("entry {0}={1}", entry.getKey(), entry.getValue())); //NOI18N // Set it in session app.setValueInSession(session, entry.getKey().getName(), entry.getValue()); diff --git a/web/preview.jsp b/web/preview.jsp index afebc535..70fb334a 100644 --- a/web/preview.jsp +++ b/web/preview.jsp @@ -161,7 +161,7 @@
- " <%=app.getDisabledHtmlFromSession(request, session)%> /> + " <%=app.getDisabledHtmlFromSession(request, session)%> />
@@ -178,10 +178,10 @@
- +
- " <%=app.getDisabledHtmlFromSession(request, session)%> /> + " <%=app.getDisabledHtmlFromSession(request, session)%> />
-- 2.39.5