Search in sources :

Example 11 with Organization

use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.

the class TagBean method getAllOrganizations.

public List<SelectItem> getAllOrganizations() {
    final List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    final List<SelectItem> ret = new ArrayList<SelectItem>();
    for (Organization ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) Organization(com.autentia.tnt.businessobject.Organization) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 12 with Organization

use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.

the class TagBean method deleteOrganization.

public String deleteOrganization() {
    final UIData table = (UIData) FacesUtils.getComponent("tag:organizations");
    final Organization toDelete = (Organization) table.getRowData();
    tag.getOrganizationTags().remove(toDelete);
    return NavigationResults.EDIT;
}
Also used : Organization(com.autentia.tnt.businessobject.Organization) UIData(javax.faces.component.UIData)

Example 13 with Organization

use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.

the class TagBean method createOrganizationTags.

/**
 * Create a new empty instance of the one-to-many field
 *
 * @return forward to the same page
 */
public String createOrganizationTags() {
    Organization item = new Organization();
    if (tag.getOrganizationTags() == null) {
        tag.setOrganizationTags(new HashSet());
    }
    tag.getOrganizationTags().add(item);
    return null;
}
Also used : Organization(com.autentia.tnt.businessobject.Organization) HashSet(java.util.HashSet)

Example 14 with Organization

use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.

the class TagBean method getOrganizationTagsSelected.

/**
 * Get the list of all organizationTags selected
 *
 * @return the list of all organizationTags selected
 */
public List<SelectItem> getOrganizationTagsSelected() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<Organization> refs = this.getOrganizationTags();
    for (Organization ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : Organization(com.autentia.tnt.businessobject.Organization) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 15 with Organization

use of com.autentia.tnt.businessobject.Organization in project TNTConcept by autentia.

the class AdvancedSearchContactBean method getAllOrganizations.

public List<SelectItem> getAllOrganizations() {
    List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("id"));
    List ret = new ArrayList();
    for (Organization ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) Organization(com.autentia.tnt.businessobject.Organization) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

Organization (com.autentia.tnt.businessobject.Organization)24 ArrayList (java.util.ArrayList)17 SelectItem (javax.faces.model.SelectItem)16 SortCriteria (com.autentia.tnt.dao.SortCriteria)15 Project (com.autentia.tnt.businessobject.Project)2 HashSet (java.util.HashSet)2 Department (com.autentia.tnt.businessobject.Department)1 OrganizationType (com.autentia.tnt.businessobject.OrganizationType)1 ProjectRole (com.autentia.tnt.businessobject.ProjectRole)1 OrganizationTypeDAO (com.autentia.tnt.dao.hibernate.OrganizationTypeDAO)1 DepartmentSearch (com.autentia.tnt.dao.search.DepartmentSearch)1 HashMap (java.util.HashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 List (java.util.List)1 UIData (javax.faces.component.UIData)1