]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Added more fields the user may want to fill out + used some beans
authorRoland Haeder <roland@mxchange.org>
Thu, 6 Aug 2015 13:15:54 +0000 (15:15 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 6 Aug 2015 13:15:54 +0000 (15:15 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/pizzaapplication/customer/Customer.java
src/java/org/mxchange/pizzaapplication/customer/bean/CustomerBean.java
web/finished.jsp
web/order.jsp
web/style.css

index 8dd11480632292c45e8288e7c292b8234ca341a3..7d2cf5f449ac31c0402ae26ff7b4756dd80acf53 100644 (file)
@@ -19,9 +19,10 @@ package org.mxchange.pizzaapplication.customer;
 import org.mxchange.jcore.contact.Contact;
 
 /**
+ * A customer interface
  *
  * @author Roland Haeder
  */
 public interface Customer extends Contact {
-       
+
 }
index 459f5bcf6ab133f2f5243f4dde85e15c9e8795eb..e1edf34c9d8cef3e78153b5aa28377d413f81acb 100644 (file)
  */
 package org.mxchange.pizzaapplication.customer.bean;
 
+import org.mxchange.pizzaapplication.customer.Customer;
 import org.mxchange.pizzaapplication.customer.PizzaServiceCustomer;
 
 /**
+ * A customer bean which hides the customer instance
  *
  * @author Roland Haeder
  */
-public class CustomerBean extends PizzaServiceCustomer {
-       
+public class CustomerBean extends PizzaServiceCustomer implements Customer {
+
+       /**
+        * Default constructor
+        */
+       public CustomerBean () {
+               // Init customer instance
+               Customer customer = new PizzaServiceCustomer();
+
+               // Set it here
+               this.setContact(customer);
+       }
 }
index 68322e02a96816e1bd0725e1006525e7bb34bea0..61b604bab7216c525aee76a731f2d098b454e784 100644 (file)
@@ -4,7 +4,9 @@
        Author     : Roland Haeder
 --%>
 
+<%--
 <%@page errorPage="errorHandler.jsp" %>
+--%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 
 <%@page import="java.util.Map"%>
index a6a3b8518017de110f85a00bb223fa369a8fff3c..cc190c179266c828bdfaf872d2aa45c8ecc39d8c 100644 (file)
 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
 <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
+<%@page import="org.mxchange.pizzaapplication.customer.Customer" %>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>
 
+<jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.CustomerBean" type="Customer" />
+<jsp:setProperty name="customer" property="*" />
+
 <%
        // Init application instance
        PizzaApplication app = PizzaServiceApplication.getInstance(application);
 
                                                <tr>
                                                        <td colspan="5">
-                                                               <fieldset title="Bitte geben Sie Ihre Daten ein.">
-                                                                       <legend>Bitte Ihre Daten eingeben:</legend>
+                                                               <fieldset>
+                                                                       <legend title="Bitte geben Sie Ihre Daten ein.">Bitte Ihre Daten eingeben:</legend>
 
+                                                                       <div class="data_row">
                                                                        <div class="data_row">
+                                                                               <div class="data_left">
+                                                                                       <label for="companyname">Firmenname:</label>
+                                                                               </div>
+                                                                               <div class="data_right">
+                                                                                       <input type="text" id="companyname" name="companyname" size="10" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                               </div>
+                                                                               <div class="clear"></div>
+                                                                       </div>
+
                                                                                <div class="data_left">
                                                                                        <label for="surname">Vorname:</label>
                                                                                </div>
 
                                                                        <div class="data_row">
                                                                                <div class="data_left">
-                                                                                       <label for="family_name">Nachname:</label>
+                                                                                       <label for="familyname">Nachname:</label>
                                                                                </div>
                                                                                <div class="data_right">
-                                                                                       <input type="text" id="family_name" name="family_name" size="10" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                                       <input type="text" id="familyname" name="familyname" size="10" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
                                                                                </div>
                                                                                <div class="clear"></div>
                                                                        </div>
                                                                                        <label for="street">Straße:</label>
                                                                                </div>
                                                                                <div class="data_right">
-                                                                                       <input type="text" id="street" name="street" size="10" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                                       <input type="text" id="street" name="street" size="20" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
                                                                                </div>
                                                                                <div class="clear"></div>
                                                                        </div>
 
                                                                        <div class="data_row">
                                                                                <div class="data_left">
-                                                                                       <label for="housenumber">Hausnummer:</label>
+                                                                                       <label for="houseNumber">Hausnummer:</label>
                                                                                </div>
                                                                                <div class="data_right">
-                                                                                       <input type="text" id="housenumber" name="housenumber" size="10" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                                       <input type="text" id="houseNumber" name="houseNumber" size="3" maxlength="5" <%=app.getDisabledHtmlFromSession(request, session)%> />
                                                                                </div>
                                                                                <div class="clear"></div>
                                                                        </div>
 
                                                                        <div class="data_row">
                                                                                <div class="data_left">
-                                                                                       <label for="zip_code">Postleitzahl:</label>
+                                                                                       <label for="zipCode">Postleitzahl:</label>
                                                                                </div>
                                                                                <div class="data_right">
-                                                                                       <input type="text" id="zip_code" name="zip_code" size="5" maxlength="6" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                                       <input type="text" id="zipCode" name="zipCode" size="5" maxlength="6" <%=app.getDisabledHtmlFromSession(request, session)%> />
                                                                                </div>
                                                                                <div class="clear"></div>
                                                                        </div>
 
                                                                        <div class="data_row">
                                                                                <div class="data_left">
-                                                                                       <label for="phone_number">Telefon:</label>
+                                                                                       <label for="phoneNumber">Telefon:</label>
+                                                                               </div>
+                                                                               <div class="data_right">
+                                                                                       <input type="text" id="phoneNumber" name="phoneNumber" size="20" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                               </div>
+                                                                               <div class="clear"></div>
+                                                                       </div>
+
+                                                                       <div class="data_row">
+                                                                               <div class="data_left">
+                                                                                       <label for="faxNumber">Faxnummer:</label>
+                                                                               </div>
+                                                                               <div class="data_right">
+                                                                                       <input type="text" id="faxNumber" name="faxNumber" size="20" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                               </div>
+                                                                               <div class="clear"></div>
+                                                                       </div>
+
+                                                                       <div class="data_row">
+                                                                               <div class="data_left">
+                                                                                       <label for="cellphoneNumber">Handy:</label>
                                                                                </div>
                                                                                <div class="data_right">
-                                                                                       <input type="text" id="phone_number" name="phone_number" size="10" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
+                                                                                       <input type="text" id="cellphoneNumber" name="cellphoneNumber" size="20" maxlength="255" <%=app.getDisabledHtmlFromSession(request, session)%> />
                                                                                </div>
                                                                                <div class="clear"></div>
                                                                        </div>
 
                                                <tr>
                                                        <td colspan="5" class="table_footer">
+                                                               <input type="reset" value="Formular zurücksetzen" />
                                                                <input type="submit" name="send" value="Bestellung abschliessen" <%=app.getDisabledHtmlFromSession(request, session)%> />
                                                        </td>
                                                </tr>
index 18c45f573e9d49277423b1c8c903f59b25a206e4..61515f9782b23179878f367e6f819d281066b5da 100644 (file)
@@ -9,7 +9,7 @@
 }
 
 .data_right {
-       width: 100px;
+       width: 150px;
        float: right;
 }