/**
* 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;
}
// 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) {
@Override
public List<AddableBasketItem> allItems () {
+ // Trace message
+ this.getLogger().logTrace("allItems: CALLED!");
+
// Deligate to basket instance
- return this.basket.getAll();
+ List<AddableBasketItem> 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
// 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;
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;
}
}
+ // 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
}
}
+ // Trace message
+ this.getLogger().logTrace(MessageFormat.format("changeItem: targetPage={0} - EXIT!", targetPage));
+
// Return page
return targetPage;
}
@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;
}
@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
// 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
// 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();
}
}
+ // Trace message
+ this.getLogger().logTrace(MessageFormat.format("outputLastAddedItem: lastItem={0} - EXIT!", lastItem));
+
// Return it
return lastItem;
}
* @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
// Create fake instance
AddableBasketItem fake = new BasketItem(product);
+ // Debug message
+ this.getLogger().logDebug(MessageFormat.format("getItemFromProduct: fake={0}", fake));
+
// Get all items
List<AddableBasketItem> 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
}
}
+ // Trace message
+ this.getLogger().logTrace(MessageFormat.format("getItemFromProduct: foundItem={0} - EXIT!", foundItem));
+
// Return it
return foundItem;
}
*/
package org.mxchange.pizzaapplication.beans.checkout;
+import java.text.MessageFormat;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
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
@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<AddableBasketItem> list = this.basketController.allItems();
+ // Debug message
+ this.getLogger().logTrace(MessageFormat.format("doCheckout: list={0}", list));
+
// Construct container
WrapableCheckout wrapper = new CheckoutWrapper();
wrapper.setCustomer(customer);
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
// 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);
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));
- }
}
package org.mxchange.pizzaapplication.beans.checkout;
import java.io.Serializable;
-import org.mxchange.jcore.model.contact.gender.Gender;
/**
* An interface for the shop
* @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);
}
*/
package org.mxchange.pizzaapplication.beans.customer;
+import java.text.MessageFormat;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
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<roland@mxchange.org>
*/
-@Named("customer")
+@Named("customerController")
@SessionScoped
public class CustomerWebBean extends BaseFrameworkBean implements CustomerWebController {
/**
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
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));
+ }
}
import java.io.Serializable;
import org.mxchange.jcore.model.contact.gender.Gender;
+import org.mxchange.jshopcore.model.customer.Customer;
/**
* An interface for customer beans
*/
public interface CustomerWebController extends Serializable {
+ /**
+ * Creates an instance from all properties
+ *
+ * @return A Customer instance
+ */
+ public Customer createInstance ();
+
/**
* Gender of the contact
*
* @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 ();
}
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <h:selectOneMenu class="select" id="gender" value="#{customer.gender}">
+ <h:selectOneMenu class="select" id="gender" value="#{customerController.gender}">
<f:selectItems value="#{gender.selectableGenders}" var="g" itemValue="#{g}" itemLabel="#{msg[g.messageKey]}" />
</h:selectOneMenu>
</ui:composition>
</div>
<div class="table_right">
- <h:inputText class="input" id="companyname" size="15" maxlength="255" value="#{customer.companyName}" />
+ <h:inputText class="input" id="companyname" size="15" maxlength="255" value="#{customerController.companyName}" />
</div>
<div class="clear"></div>
</div>
<div class="table_right">
- <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{customer.firstName}" required="true">
+ <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{customerController.firstName}" required="true">
<f:validator validatorId="NameValidator" />
</h:inputText>
</div>
</div>
<div class="table_right">
- <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{customer.familyName}" required="true">
+ <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{customerController.familyName}" required="true">
<f:validator validatorId="NameValidator" />
</h:inputText>
</div>
</div>
<div class="table_right">
- <h:inputText class="input" id="street" size="20" maxlength="255" value="#{customer.street}" required="true">
+ <h:inputText class="input" id="street" size="20" maxlength="255" value="#{customerController.street}" required="true">
<f:validator validatorId="NameValidator" />
</h:inputText>
</div>
</div>
<div class="table_right">
- <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{customer.houseNumber}" required="true">
+ <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{customerController.houseNumber}" required="true">
<f:validateLongRange minimum="1" maximum="500" />
</h:inputText>
</div>
</div>
<div class="table_right">
- <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{customer.zipCode}" required="true" />
+ <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{customerController.zipCode}" required="true" />
</div>
<div class="clear"></div>
</div>
<div class="table_right">
- <h:inputText class="input" id="city" size="10" maxlength="255" value="#{customer.city}" required="true">
+ <h:inputText class="input" id="city" size="10" maxlength="255" value="#{customerController.city}" required="true">
<f:validator validatorId="NameValidator" />
</h:inputText>
</div>
</div>
<div class="table_right">
- <h:inputText class="input" id="phoneNumber" size="20" maxlength="255" value="#{customer.phoneNumber}" />
+ <h:inputText class="input" id="phoneNumber" size="20" maxlength="255" value="#{customerController.phoneNumber}" />
</div>
<div class="clear"></div>
</div>
<div class="table_right">
- <h:inputText class="input" id="faxNumber" size="20" maxlength="255" value="#{customer.faxNumber}" />
+ <h:inputText class="input" id="faxNumber" size="20" maxlength="255" value="#{customerController.faxNumber}" />
</div>
<div class="clear"></div>
</div>
<div class="table_right">
- <h:inputText class="input" id="cellphoneNumber" size="20" maxlength="255" value="#{customer.cellphoneNumber}" />
+ <h:inputText class="input" id="cellphoneNumber" size="20" maxlength="255" value="#{customerController.cellphoneNumber}" />
</div>
<div class="clear"></div>
</div>
<div class="table_right">
- <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" />
+ <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{customerController.emailAddress}" required="true" />
</div>
<div class="clear"></div>
</div>
<div class="table_right">
- <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" />
+ <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{customerController.emailAddress}" required="true" />
</div>
<div class="clear"></div>