use of com.autentia.tnt.dao.search.ContactSearch 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.dao.search.ContactSearch in project TNTConcept by autentia.
the class BillBean method getContactsBySelectedOrganization.
public List<SelectItem> getContactsBySelectedOrganization() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ContactSearch cs = new ContactSearch();
cs.setOrganization(getSelectedOrganization());
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;
}
Aggregations