From: Roland Haeder Date: Mon, 10 Aug 2015 09:50:12 +0000 (+0200) Subject: Fixed form field name which must be equal to class' attribute's name and public getter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=22c468846e5a876fa94955c7db733b7f73ffc05f;p=pizzaservice-war.git Fixed form field name which must be equal to class' attribute's name and public getter Signed-off-by:Roland Häder --- 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)%> />