/**
*
*/
public CustomerAddressListViewBean buildViewBeanCustomerAddressList(final RequestData requestData, final Customer customer) throws Exception {
final CustomerAddressListViewBean customerAddressListViewBean = new CustomerAddressListViewBean();
customerAddressListViewBean.setBackUrl(urlService.generateUrl(FoUrls.HOME, requestData));
final Set<CustomerAddress> addresses = customer.getAddresses();
if(Hibernate.isInitialized(addresses) && addresses != null){
for (Iterator<CustomerAddress> iterator = addresses.iterator(); iterator.hasNext();) {
CustomerAddress customerAddress = (CustomerAddress) iterator.next();
customerAddressListViewBean.getCustomerAddressList().add(buildViewBeanCustomeAddress(requestData, customerAddress));
}
}
return customerAddressListViewBean;
}