use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class TagBean method getDepartmentTagss.
/**
* Get the list of all departmentTagss
*
* @return the list of all departmentTagss
*/
public List<SelectItem> getDepartmentTagss() {
List<Department> refs = DepartmentManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Department ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class TagBean method getDepartmentTagsSelected.
/**
* Get the list of all departmentTags selected
*
* @return the list of all departmentTags selected
*/
public List<SelectItem> getDepartmentTagsSelected() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<Department> refs = this.getDepartmentTags();
for (Department ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class ContactBean method getAllDepartmentsOfCompany.
public List<SelectItem> getAllDepartmentsOfCompany() {
final Set<Organization> organizations = new LinkedHashSet<Organization>();
organizations.add(this.getSelectedOrganization());
final DepartmentSearch departmentSearch = new DepartmentSearch();
departmentSearch.setOrganization(this.getSelectedOrganization());
final List<Department> refs = DepartmentManager.getDefault().getAllEntities(departmentSearch, new SortCriteria("name"));
final List<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem(null, FacesUtils.getMessage("contact.selectOneDepartment")));
for (Department ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class TagBean method editDepartmentTags.
/**
* Create a new empty instance of the one-to-many field
*
* @return forward to the same page
*/
public String editDepartmentTags() {
Department item = new Department();
if (tag.getDepartmentTags() == null) {
tag.setDepartmentTags(new HashSet());
}
tag.getDepartmentTags().add(item);
return null;
}
use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class TagBean method deleteDepartment.
public String deleteDepartment() {
final UIData table = (UIData) FacesUtils.getComponent("tag:departments");
final Department toDelete = (Department) table.getRowData();
tag.getDepartmentTags().remove(toDelete);
return NavigationResults.EDIT;
}
Aggregations