use of com.autentia.tnt.businessobject.Contact in project TNTConcept by autentia.
the class CollaboratorBean method getContacts.
/**
* Get the list of all contacts
* @return the list of all contacts
*/
public List<SelectItem> getContacts() {
List<Contact> refs = ContactManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem(null, ""));
for (Contact ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Contact in project TNTConcept by autentia.
the class OfferBean method getContactsBySelectedOrganization.
/**
* Selected organization *
*/
public List<SelectItem> getContactsBySelectedOrganization() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ContactSearch cs = new ContactSearch();
cs.setOrganization(getOrganization());
List<Contact> refs = ContactManager.getDefault().getAllEntities(cs, new SortCriteria("name"));
for (Contact ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
// AƱadiendo el campo vacio
ret.add(0, new SelectItem(""));
return ret;
}
use of com.autentia.tnt.businessobject.Contact in project TNTConcept by autentia.
the class TagBean method createContactTags.
// Getters to list possible values of enum fields
// Methods to create/remove instances of one-to-many entities (slave
// entities)
/**
* Create a new empty instance of the one-to-many field
*
* @return forward to the same page
*/
public String createContactTags() {
Contact item = new Contact();
if (tag.getContactTags() == null) {
tag.setContactTags(new HashSet());
}
tag.getContactTags().add(item);
return null;
}
use of com.autentia.tnt.businessobject.Contact in project TNTConcept by autentia.
the class TagBean method deleteContact.
public String deleteContact() {
final UIData table = (UIData) FacesUtils.getComponent("tag:contacts");
final Contact toDelete = (Contact) table.getRowData();
tag.getContactTags().remove(toDelete);
return NavigationResults.EDIT;
}
use of com.autentia.tnt.businessobject.Contact in project TNTConcept by autentia.
the class OfferBean method getContacts.
/**
* Get the list of all contacts
*
* @return the list of all contacts
*/
public List<SelectItem> getContacts() {
List<Contact> refs = ContactManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Contact ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
Aggregations