return createAccountForm;
}
public CustomerEditForm buildCustomerEditForm(final RequestData requestData, final Customer customer) throws Exception {
final MarketArea marketArea = requestData.getMarketArea();
CustomerEditForm customerEditForm = new CustomerEditForm();
if(customer != null){
customerEditForm.setTitle(customer.getTitle());
customerEditForm.setLastname(customer.getLastname());
customerEditForm.setFirstname(customer.getFirstname());
customerEditForm.setEmail(customer.getEmail());
final CustomerMarketArea customerMarketContext = customer.getCurrentCustomerMarketArea(marketArea.getId());
if(customerMarketContext != null){
customerEditForm.setMobile(customerMarketContext.getMobile());
customerEditForm.setPhone(customerMarketContext.getPhone());
customerEditForm.setFax(customerMarketContext.getFax());
// customerEditForm.setOptin(customerMarketContext.isOptin());
}
}
return customerEditForm;
}