@Override
protected void chooseEntity(EntityPanel panel, AddCompanyForm form, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
{
try
{
ContactVO contact = (ContactVO) panel.getEntity();
contact.setCompany(new CompanyDAO().getById(form.getId()));
}
catch (HibernateException e)
{
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("default.error.invalidEntity", new Integer(form.getId())));