Package org.hoteia.qalingo.web.mvc.form

Examples of org.hoteia.qalingo.web.mvc.form.CustomerEditForm


    // WE RELOAD THE CUSTOMER FOR THE PERSISTANCE PROXY FILTER
    // IT AVOIDS LazyInitializationException: could not initialize proxy - no Session
    final Customer reloadedCustomer = customerService.getCustomerByLoginOrEmail(currentCustomer.getLogin());
       
    if(customerEditForm == null
            || customerEditForm.equals(new CustomerEditForm())){
      customerEditForm = formFactory.buildCustomerEditForm(requestData, reloadedCustomer);
      model.addAttribute("customerEditForm", customerEditForm);
    }
   
    Object[] params = { currentCustomer.getLastname(), currentCustomer.getFirstname() };
View Full Code Here


    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;
  }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.web.mvc.form.CustomerEditForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.