public class PageAddressAction extends EditPageAction<PageAddressForm> {
private static Logger log = Logger.getLogger(PageAddressAction.class);
@Override
public void writeForm(PageAddressForm form, ActionMessages errors, HttpServletRequest request) {
CompanyVO company = (CompanyVO) getPanel().getEntity();
for(AddressVO address : company.getAddresses()) {
if(AddressVO.Type.MAIN.equals(address.getType())) {
form.setMainAddressName(address.getName());
form.setMainAddressStreet(address.getStreet());
form.setMainAddressZip(address.getZip());
form.setMainAddressCity(address.getCity());