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

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


     
    return customerAddressForm;
  }
 
  public CartForm buildCartForm(final RequestData requestData) throws Exception {
    final CartForm cartForm = new CartForm();
    Customer customer = requestData.getCustomer();
    if(customer != null) {
       Set<CustomerAddress> addresses = customer.getAddresses();
       for (Iterator<CustomerAddress> iterator = addresses.iterator(); iterator.hasNext();) {
        CustomerAddress customerAddress = (CustomerAddress) iterator.next();
        if(customerAddress.isDefaultBilling()) {
          cartForm.setBillingAddressId(customerAddress.getId().toString());
        }
        if(customerAddress.isDefaultShipping()) {
          cartForm.setShippingAddressId(customerAddress.getId().toString());
        }
      }
    }
    return cartForm;
  }
View Full Code Here

TOP

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

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.