From: Roland Haeder Date: Wed, 16 Sep 2015 10:05:08 +0000 (+0200) Subject: Continiued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8c7a54133e38ac34cf88cc073174ae368aeab3b8;p=pizzaservice-war.git Continiued: - moved creating of Customer instance to proper bean - renamed that bean to reflect its purpose better - added a lot logger messages - updated jars Signed-off-by:Roland Häder --- diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 20252ca0..32a615bb 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar index eda325ad..4a925a98 100644 Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar index d3501cbe..1a0b0d99 100644 Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java index d9c540d4..95c2e71c 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/basket/BasketWebBean.java @@ -71,27 +71,42 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl /** * Default constructor - * - * @throws javax.naming.NamingException If something happened? */ - public BasketWebBean () throws NamingException { - // Get initial context - Context context = new InitialContext(); - + public BasketWebBean () { // Get new application instance this.basket = new ShopBasket(); - // Try to lookup - this.basketBean = (BasketSessionBeanRemote) context.lookup("ejb/stateless-basket"); //NOI18N + try { + // Get initial context + Context context = new InitialContext(); + + // Try to lookup + this.basketBean = (BasketSessionBeanRemote) context.lookup("ejb/stateless-basket"); //NOI18N + } catch (final NamingException ex) { + // Continue to throw + throw new FacesException(ex); + } } @Override public String addItem (final Product product) { + // Trace message + this.getLogger().logTrace(MessageFormat.format("addItem: product={0} - CALLED!", product)); + + // product should not be null + if (null == product) { + // Abort here + throw new NullPointerException("product is null"); + } + // Generate item instance AddableBasketItem item = new BasketItem(product, this.getAmount()); // Is amount set? if (this.getAmount() == null) { + // Trace message + this.getLogger().logTrace("addItem: amount not specified, returning null ... - EXIT!"); + // No amount specified?! return null; } @@ -109,6 +124,9 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Remove amount this.setAmount(null); + // Trace message + this.getLogger().logTrace(MessageFormat.format("addItem: item {0} - has been added to basket. - EXIT!", item)); + // Added return "item_added"; //NOI18N } catch (final BasketItemAlreadyAddedException ex) { @@ -119,12 +137,24 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl @Override public List allItems () { + // Trace message + this.getLogger().logTrace("allItems: CALLED!"); + // Deligate to basket instance - return this.basket.getAll(); + List list = this.basket.getAll(); + + // Trace message + this.getLogger().logTrace(MessageFormat.format("allItems: list={0} - EXIT!", list)); + + // Return it + return list; } @Override public Float calculateCurrentItemPrice () { + // Trace message + this.getLogger().logTrace("calculateCurrentItemPrice: CALLED!"); + // Is the current item/amount set? if (this.getCurrentItem() == null) { // Current item is null @@ -140,12 +170,24 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Caculate item's price Float totalPrice = (this.getCurrentItem().getProduct().getPrice() * this.getCurrentItem().getAmount()); + // Trace message + this.getLogger().logTrace(MessageFormat.format("calculateCurrentItemPrice: totalPrice={0} - EXIT!", totalPrice)); + // Return it return totalPrice; } @Override public Float calculateItemPrice (final AddableBasketItem item) { + // Trace message + this.getLogger().logTrace(MessageFormat.format("calculateItemPrice: item={0} - CALLED!", item)); + + // item must not be null + if (null == item) { + // Abort here + throw new NullPointerException("item is null"); + } + // Default value Float totalPrice = 0.0f; @@ -155,12 +197,18 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl totalPrice = (item.getProduct().getPrice() * item.getAmount()); } + // Trace message + this.getLogger().logTrace(MessageFormat.format("calculateItemPrice: totalPrice={0} - EXIT!", totalPrice)); + // Return it return totalPrice; } @Override public Float calculateTotalPrice () { + // Trace message + this.getLogger().logTrace("calculateTotalPrice: CALLED!"); + // Init total price Float totalPrice = 0.0f; @@ -173,12 +221,24 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl } } + // Trace message + this.getLogger().logTrace(MessageFormat.format("calculateTotalPrice: totalPrice={0} - EXIT!", totalPrice)); + // Return final sum return totalPrice; } @Override public String changeItem (final AddableBasketItem item) { + // Trace message + this.getLogger().logTrace(MessageFormat.format("changeItem: item={0} - CALLED!", item)); + + // item shall not be null + if (null == item) { + // Abort here + throw new NullPointerException("item is null"); + } + // Default is not found String targetPage = "item_not_changed"; //NOI18N @@ -192,6 +252,9 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl } } + // Trace message + this.getLogger().logTrace(MessageFormat.format("changeItem: targetPage={0} - EXIT!", targetPage)); + // Return page return targetPage; } @@ -225,19 +288,37 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl @Override public Long getItemAmount (final Product product) { + // Trace message + this.getLogger().logTrace(MessageFormat.format("getItemAmount: product={0} - CALLED!", product)); + + // product should not be null + if (null == product) { + // Abort here + throw new NullPointerException("product is null"); + } + // Initial value is zero Long itemAmount = 0L; // Iterate over all for (final AddableBasketItem item : this.allItems()) { + // Debug message + this.getLogger().logDebug(MessageFormat.format("getItemAmount: item={0}", item)); + // Is this product instance and same? - if ((item.isProductType()) && (item.getProduct().equals(product))) { + if (null == item) { + // item is null + throw new NullPointerException("item is null"); + } else if ((item.isProductType()) && (item.getProduct().equals(product))) { // Found it itemAmount = item.getAmount(); break; } } + // Trace message + this.getLogger().logTrace(MessageFormat.format("getItemAmount: itemAmount={0} - EXIT!", itemAmount)); + // Return it return itemAmount; } @@ -274,6 +355,9 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl @Override public boolean isProductAdded (final Product product) { + // Trace message + this.getLogger().logTrace(MessageFormat.format("isProductAdded: product={0} - EXIT!", product)); + // Must not be null if (null == product) { // Abort here @@ -283,24 +367,39 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Generate fake instance AddableBasketItem fake = new BasketItem(product); + // Debug message + this.getLogger().logDebug(MessageFormat.format("isProductAdded: fake={0}", fake)); + // Ask bean about it boolean isAdded = this.basket.isAdded(fake); + // Debug message + this.getLogger().logDebug(MessageFormat.format("isProductAdded: isAdded={0}", isAdded)); + // Is it added? if (isAdded) { // Get item AddableBasketItem item = this.getItemFromProduct(product); + // Debug message + this.getLogger().logDebug(MessageFormat.format("isProductAdded: item={0} - setting as current item.", item)); + // Set this as current item this.setCurrentItem(item); } + // Trace message + this.getLogger().logTrace(MessageFormat.format("isProductAdded: isAdded={0} - EXIT!", isAdded)); + // Return status return isAdded; } @Override public String outputLastAddedItem () { + // Trace message + this.getLogger().logTrace("outputLastAddedItem: CALLED!"); + // Default message String lastItem = ""; //NOI18N @@ -312,7 +411,7 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Get type switch (item.getItemType()) { case "product": // Sellable product //NOI18N - assert(item.getProduct() instanceof Product) : MessageFormat.format("item {0} has no product instance set.", item); //NOI18N + assert (item.getProduct() instanceof Product) : MessageFormat.format("item {0} has no product instance set.", item); //NOI18N // Get title lastItem = item.getProduct().getTitle(); @@ -323,6 +422,9 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl } } + // Trace message + this.getLogger().logTrace(MessageFormat.format("outputLastAddedItem: lastItem={0} - EXIT!", lastItem)); + // Return it return lastItem; } @@ -345,6 +447,9 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl * @return Item instance or null if not found */ private AddableBasketItem getItemFromProduct (final Product product) { + // Trace message + this.getLogger().logTrace(MessageFormat.format("getItemFromProduct: product={0} - CALLED!", product)); + // Product must not be null if (null == product) { // Abort here @@ -357,11 +462,20 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl // Create fake instance AddableBasketItem fake = new BasketItem(product); + // Debug message + this.getLogger().logDebug(MessageFormat.format("getItemFromProduct: fake={0}", fake)); + // Get all items List list = this.basket.getAll(); + // Debug message + this.getLogger().logDebug(MessageFormat.format("getItemFromProduct: list={0}", list)); + // Check all entries for (final AddableBasketItem item : list) { + // Debug message + this.getLogger().logDebug(MessageFormat.format("getItemFromProduct: item={0}", item)); + // item must not be null if (null == item) { // Abort here @@ -376,6 +490,9 @@ public class BasketWebBean extends BaseFrameworkBean implements BasketWebControl } } + // Trace message + this.getLogger().logTrace(MessageFormat.format("getItemFromProduct: foundItem={0} - EXIT!", foundItem)); + // Return it return foundItem; } diff --git a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java index d36c2595..3de6f0ea 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebBean.java @@ -16,6 +16,7 @@ */ package org.mxchange.pizzaapplication.beans.checkout; +import java.text.MessageFormat; import java.util.List; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; @@ -33,14 +34,13 @@ import javax.jms.Session; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.mxchange.jcore.model.contact.gender.Gender; import org.mxchange.jcoreee.beans.BaseFrameworkBean; import org.mxchange.jshopcore.model.basket.AddableBasketItem; import org.mxchange.jshopcore.model.customer.Customer; -import org.mxchange.jshopcore.model.customer.ShopCustomer; import org.mxchange.jshopcore.wrapper.CheckoutWrapper; import org.mxchange.jshopcore.wrapper.WrapableCheckout; import org.mxchange.pizzaapplication.beans.basket.BasketWebController; +import org.mxchange.pizzaapplication.beans.customer.CustomerWebController; /** * Checkout controller @@ -88,85 +88,53 @@ public class CheckoutWebBean extends BaseFrameworkBean implements CheckoutWebCon @Inject private BasketWebController basketController; - /////////////////////// Properties ///////////////////// /** - * Gender + * Customer bean */ - private Gender gender; - - /** - * First name - */ - private String firstName; - - /** - * Family name - */ - private String familyName; - - /** - * Company name - */ - private String companyName; - - /** - * Street - */ - private String street; - - /** - * House number - */ - private Long houseNumber; - - /** - * ZIP code - */ - private Long zipCode; - - /** - * City - */ - private String city; - - /** - * Phone number - */ - private String phoneNumber; - - /** - * Fax number - */ - private String faxNumber; - - /** - * Cellphone number - */ - private String cellphoneNumber; + @Inject + private CustomerWebController customerController; @Override public String doCheckout () { - // Is the bean set? + // Trace message + this.getLogger().logTrace("doCheckout: CALLED!"); + + // Are the beans set? if (null == this.basketController) { // Abort here throw new NullPointerException("basketController is null"); //NOI18N + } else if (null == this.customerController) { + // Abort here + throw new NullPointerException("customer is null"); //NOI18N } // Are at least the required fields set? - if (!this.isRequiredPersonalDataSet()) { + if (!this.customerController.isRequiredPersonalDataSet()) { + // Trace message + this.getLogger().logTrace("doCheckout: Not all required fields are set, returning checkout2 ... - EXIT!"); + // Not set, should not happen return "checkout2"; //NOI18N } else if (this.basketController.isEmpty()) { + // Trace message + this.getLogger().logTrace("doCheckout: basket is empty, returning empty_basket ... - EXIT!"); + // Nothing to order return "empty_basket"; //NOI18N } // Create customer instance - Customer customer = this.createCustomer(); + Customer customer = this.customerController.createInstance(); + + // Debug message + this.getLogger().logDebug(MessageFormat.format("doCheckout: customer={0}", customer)); // Get ordered list List list = this.basketController.allItems(); + // Debug message + this.getLogger().logTrace(MessageFormat.format("doCheckout: list={0}", list)); + // Construct container WrapableCheckout wrapper = new CheckoutWrapper(); wrapper.setCustomer(customer); @@ -191,116 +159,6 @@ public class CheckoutWebBean extends BaseFrameworkBean implements CheckoutWebCon return "checkout_done"; //NOI18N } - @Override - public String getCellphoneNumber () { - return this.cellphoneNumber; - } - - @Override - public void setCellphoneNumber (final String cellphoneNumber) { - this.cellphoneNumber = cellphoneNumber; - } - - @Override - public String getCity () { - return this.city; - } - - @Override - public void setCity (final String city) { - this.city = city; - } - - @Override - public String getCompanyName () { - return this.companyName; - } - - @Override - public void setCompanyName (final String companyName) { - this.companyName = companyName; - } - - @Override - public String getFamilyName () { - return this.familyName; - } - - @Override - public void setFamilyName (final String familyName) { - this.familyName = familyName; - } - - @Override - public String getFaxNumber () { - return this.faxNumber; - } - - @Override - public void setFaxNumber (final String faxNumber) { - this.faxNumber = faxNumber; - } - - @Override - public String getFirstName () { - return this.firstName; - } - - @Override - public void setFirstName (final String firstName) { - this.firstName = firstName; - } - - @Override - public Gender getGender () { - return this.gender; - } - - @Override - public void setGender (final Gender gender) { - this.gender = gender; - } - - @Override - public Long getHouseNumber () { - return this.houseNumber; - } - - @Override - public void setHouseNumber (final Long houseNumber) { - this.houseNumber = houseNumber; - } - - @Override - public String getPhoneNumber () { - return this.phoneNumber; - } - - @Override - public void setPhoneNumber (final String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - @Override - public String getStreet () { - return this.street; - } - - @Override - public void setStreet (final String street) { - this.street = street; - } - - @Override - public Long getZipCode () { - return this.zipCode; - } - - @Override - public void setZipCode (final Long zipCode) { - this.zipCode = zipCode; - } - @PostConstruct public void init () { // Call super init for getting resource bundle @@ -324,6 +182,9 @@ public class CheckoutWebBean extends BaseFrameworkBean implements CheckoutWebCon // And message producer this.messageProducer = session.createProducer(queue); + + // Finally the message instance itself + this.message = this.session.createObjectMessage(); } catch (final NamingException | JMSException e) { // Continued to throw throw new FacesException(e); @@ -345,40 +206,4 @@ public class CheckoutWebBean extends BaseFrameworkBean implements CheckoutWebCon throw new FacesException(ex); } } - - /** - * Creates a full customer instance - * - * @return Customer instance - */ - private Customer createCustomer () { - // Required personal data must be set - assert (this.isRequiredPersonalDataSet()) : "not all personal data is set"; //NOI18N - - // Create new customer instance - Customer customer = new ShopCustomer(); - customer.setGender(this.getGender()); - customer.setFirstName(this.getFirstName()); - customer.setFamilyName(this.getFamilyName()); - customer.setCompanyName(this.getCompanyName()); - customer.setStreet(this.getStreet()); - customer.setHouseNumber(this.getHouseNumber()); - customer.setZipCode(this.getZipCode()); - customer.setCity(this.getCity()); - customer.setPhoneNumber(this.getPhoneNumber()); - customer.setFaxNumber(this.getFaxNumber()); - customer.setCellphoneNumber(this.getCellphoneNumber()); - - // Return it - return customer; - } - - /** - * Checks if the required personal data is set - * - * @return Whether the required personal data is set - */ - private boolean isRequiredPersonalDataSet () { - return ((this.getGender() != null) && (this.getFirstName() != null) && (this.getFamilyName() != null) && (this.getStreet() != null) && (this.getHouseNumber() != null) && (this.getZipCode() != null) && (this.getCity() != null)); - } } diff --git a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java index cd2f6efa..4e30f29f 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/checkout/CheckoutWebController.java @@ -17,7 +17,6 @@ package org.mxchange.pizzaapplication.beans.checkout; import java.io.Serializable; -import org.mxchange.jcore.model.contact.gender.Gender; /** * An interface for the shop @@ -31,158 +30,4 @@ public interface CheckoutWebController extends Serializable { * @return Page redirection target */ public String doCheckout (); - - /** - * Getter for cellphone number - * - * @return Cellphone number - */ - public String getCellphoneNumber (); - - /** - * Setter for cellphone number - * - * @param cellphoneNumber Cellphone number - */ - public void setCellphoneNumber (final String cellphoneNumber); - - /** - * Getter for city - * - * @return Cellphone number - */ - public String getCity (); - - /** - * Setter for city - * - * @param city City - */ - public void setCity (final String city); - - /** - * Getter for company name - * - * @return City - */ - public String getCompanyName (); - - /** - * Setter for company name - * - * @param companyName Company name - */ - public void setCompanyName (final String companyName); - - /** - * Getter for family name - * - * @return Company name - */ - public String getFamilyName (); - - /** - * Setter for family name - * - * @param familyName Family name - */ - public void setFamilyName (final String familyName); - - /** - * Getter for fax number - * - * @return Family name - */ - public String getFaxNumber (); - - /** - * Setter for fax number - * - * @param faxNumber First name - */ - public void setFaxNumber (final String faxNumber); - - /** - * Getter for first name - * - * @return First name - */ - public String getFirstName (); - - /** - * Setter for first name - * - * @param firstName Gender - */ - public void setFirstName (final String firstName); - - /** - * Getter for gender - * - * @return Gender - */ - public Gender getGender (); - - /** - * Setter for gender - * - * @param gender Gender - */ - public void setGender (final Gender gender); - - /** - * Getter for house number - * - * @return House number - */ - public Long getHouseNumber (); - - /** - * Setter for house number - * - * @param houseNumber House number - */ - public void setHouseNumber (final Long houseNumber); - - /** - * Getter for phone number - * - * @return Phone number - */ - public String getPhoneNumber (); - - /** - * Setter for phone number - * - * @param phoneNumber Phone number - */ - public void setPhoneNumber (final String phoneNumber); - - /** - * Getter for street - * - * @return Street - */ - public String getStreet (); - - /** - * Setter for street - * - * @param street Street - */ - public void setStreet (final String street); - - /** - * Getter for ZIP code - * - * @return ZIP code - */ - public Long getZipCode (); - - /** - * Setter for ZIP code - * - * @param zipCode ZIP code - */ - public void setZipCode (final Long zipCode); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java index 6adf22c0..bc76943a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java @@ -16,6 +16,7 @@ */ package org.mxchange.pizzaapplication.beans.customer; +import java.text.MessageFormat; import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; import javax.inject.Named; @@ -24,14 +25,16 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcore.model.contact.gender.Gender; import org.mxchange.jcoreee.beans.BaseFrameworkBean; +import org.mxchange.jshopcore.model.customer.Customer; import org.mxchange.jshopcore.model.customer.CustomerSessionBeanRemote; +import org.mxchange.jshopcore.model.customer.ShopCustomer; /** * A customer bean which hides the customer instance * * @author Roland Haeder */ -@Named("customer") +@Named("customerController") @SessionScoped public class CustomerWebBean extends BaseFrameworkBean implements CustomerWebController { /** @@ -131,6 +134,34 @@ public class CustomerWebBean extends BaseFrameworkBean implements CustomerWebCon this.customerBean = (CustomerSessionBeanRemote) context.lookup("ejb/stateless-customer"); } + @Override + public Customer createInstance () { + // Trace message + this.getLogger().logTrace("createInstance: CALLED!"); + // Required personal data must be set + assert (this.isRequiredPersonalDataSet()) : "not all personal data is set"; //NOI18N + + // Create new customer instance + Customer customer = new ShopCustomer(); + customer.setGender(this.getGender()); + customer.setFirstName(this.getFirstName()); + customer.setFamilyName(this.getFamilyName()); + customer.setCompanyName(this.getCompanyName()); + customer.setStreet(this.getStreet()); + customer.setHouseNumber(this.getHouseNumber()); + customer.setZipCode(this.getZipCode()); + customer.setCity(this.getCity()); + customer.setPhoneNumber(this.getPhoneNumber()); + customer.setFaxNumber(this.getFaxNumber()); + customer.setCellphoneNumber(this.getCellphoneNumber()); + + // Trace message + this.getLogger().logTrace(MessageFormat.format("createInstance: customer={0} - EXIT!", customer)); + + // Return it + return customer; + } + @PostConstruct public void init () throws RuntimeException { // Call super init first @@ -266,4 +297,9 @@ public class CustomerWebBean extends BaseFrameworkBean implements CustomerWebCon public void setCellphoneNumber (final String cellphoneNumber) { this.cellphoneNumber = cellphoneNumber; } + + @Override + public boolean isRequiredPersonalDataSet () { + return ((this.getGender() != null) && (this.getFirstName() != null) && (this.getFamilyName() != null) && (this.getStreet() != null) && (this.getHouseNumber() != null) && (this.getZipCode() != null) && (this.getCity() != null)); + } } diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java index 691211b5..e912d05d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java @@ -18,6 +18,7 @@ package org.mxchange.pizzaapplication.beans.customer; import java.io.Serializable; import org.mxchange.jcore.model.contact.gender.Gender; +import org.mxchange.jshopcore.model.customer.Customer; /** * An interface for customer beans @@ -26,6 +27,13 @@ import org.mxchange.jcore.model.contact.gender.Gender; */ public interface CustomerWebController extends Serializable { + /** + * Creates an instance from all properties + * + * @return A Customer instance + */ + public Customer createInstance (); + /** * Gender of the contact * @@ -207,4 +215,11 @@ public interface CustomerWebController extends Serializable { * @param cellphoneNumber the cellphoneNumber to set */ public void setCellphoneNumber (final String cellphoneNumber); + + /** + * Checks whether all required personal data is set + * + * @return Whether the required personal data is set + */ + public boolean isRequiredPersonalDataSet (); } diff --git a/web/WEB-INF/templates/generic/gender_selection_box.tpl b/web/WEB-INF/templates/generic/gender_selection_box.tpl index 2a5dd7dc..422ace8d 100644 --- a/web/WEB-INF/templates/generic/gender_selection_box.tpl +++ b/web/WEB-INF/templates/generic/gender_selection_box.tpl @@ -5,7 +5,7 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> - + diff --git a/web/WEB-INF/templates/guest/guest_personal_data.tpl b/web/WEB-INF/templates/guest/guest_personal_data.tpl index a3f11e83..7c780dd3 100644 --- a/web/WEB-INF/templates/guest/guest_personal_data.tpl +++ b/web/WEB-INF/templates/guest/guest_personal_data.tpl @@ -31,7 +31,7 @@
- +
@@ -43,7 +43,7 @@
- +
@@ -57,7 +57,7 @@
- +
@@ -71,7 +71,7 @@
- +
@@ -85,7 +85,7 @@
- +
@@ -99,7 +99,7 @@
- +
@@ -111,7 +111,7 @@
- +
@@ -125,7 +125,7 @@
- +
@@ -137,7 +137,7 @@
- +
@@ -149,7 +149,7 @@
- +
diff --git a/web/WEB-INF/templates/guest/guest_registration_form.tpl b/web/WEB-INF/templates/guest/guest_registration_form.tpl index a2844782..3bed98b6 100644 --- a/web/WEB-INF/templates/guest/guest_registration_form.tpl +++ b/web/WEB-INF/templates/guest/guest_registration_form.tpl @@ -24,7 +24,7 @@
- +
@@ -36,7 +36,7 @@
- +