public void initData() { ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); Contact c1 = (Contact) context.getBean("initContact1"); ContactGroup cg1 = (ContactGroup) context.getBean("initGroup1"); Contact c2 = (Contact) context.getBean("initContact2"); ContactGroup cg2 = (ContactGroup) context.getBean("initGroup2"); Contact c3 = (Contact) context.getBean("initContact3"); ContactGroup cg3 = (ContactGroup) context.getBean("initGroup3"); ContactService.createContact(c1); ContactService.createContact(c2); ContactService.createContact(c3); ContactGroupService.createContactGroup(cg1); ContactGroupService.createContactGroup(cg2); ContactGroupService.createContactGroup(cg3); create(); }
public void deleteContact(Contact contact) { ContactService.removeContactWithID(contact.getId()); create(); }
@PostConstruct public void create() { listContactNoEntreprise = ContactService.getAllContactNoEntreprise(); listContactEntreprise = ContactService.getAllEntreprise(); }