public void setContactTags(List<Contact> contactTags) { Set<Contact> result = new HashSet<Contact>(); if (contactTags != null && !contactTags.isEmpty()) { result.addAll(contactTags); } tag.setContactTags(result); }
/** * Create a new empty instance of the one-to-many field * * @return forward to the same page */ public String editContactTags() { Contact item = new Contact(); if (tag.getContactTags() == null) { tag.setContactTags(new HashSet()); } tag.getContactTags().add(item); return null; }
public void setContacts(Set<Contact> contacts) { tag.setContactTags(contacts); }