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

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


      final String urlRedirect = urlService.generateUrl(FoUrls.PERSONAL_ADDRESS_LIST,requestUtil.getRequestData(request));
          return new ModelAndView(new RedirectView(urlRedirect));
    }
   
    if(customerAddressForm == null
            || customerAddressForm.equals(new CustomerAddressForm())){
      customerAddressForm = formFactory.buildCustomerAddressForm(requestData, customerAddress);
      model.addAttribute("customerAddressForm", customerAddressForm);
    }

        return modelAndView;
View Full Code Here


    }
    return customerEditForm;
  }
 
  public CustomerAddressForm buildCustomerAddressForm(final RequestData requestData, final CustomerAddress customerAddress) throws Exception {
    final CustomerAddressForm customerAddressForm = new CustomerAddressForm();
    String languageCode = requestData.getMarketAreaLocalization().getCode();
    if(languageCode.equals("en")) {
      customerAddressForm.setCountryCode("US");
    } else if(languageCode.equals("fr")) {
      customerAddressForm.setCountryCode("FR");
    else if(languageCode.equals("de")) {
      customerAddressForm.setCountryCode("DE");
    else if(languageCode.equals("es")) {
      customerAddressForm.setCountryCode("ES");
    else if(languageCode.equals("it")) {
      customerAddressForm.setCountryCode("IT");
    else if(languageCode.equals("nl")) {
      customerAddressForm.setCountryCode("NL");
    else if(languageCode.equals("pt")) {
      customerAddressForm.setCountryCode("PT");
    }
   
    if(customerAddress != null){
      customerAddressForm.setAddressName(customerAddress.getAddressName());
      customerAddressForm.setTitle(customerAddress.getTitle());
      customerAddressForm.setLastname(customerAddress.getLastname());
      customerAddressForm.setFirstname(customerAddress.getFirstname());
       
      customerAddressForm.setAddress1(customerAddress.getAddress1());
      customerAddressForm.setAddress2(customerAddress.getAddress2());
      customerAddressForm.setAddressAdditionalInformation(customerAddress.getAddressAdditionalInformation());
      customerAddressForm.setPostalCode(customerAddress.getPostalCode());
      customerAddressForm.setCity(customerAddress.getCity());
      customerAddressForm.setStateCode(customerAddress.getStateCode());
      customerAddressForm.setAreaCode(customerAddress.getAreaCode());
      customerAddressForm.setCountryCode(customerAddress.getCountryCode());
    }
     
    return customerAddressForm;
  }
View Full Code Here

TOP

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

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.