Search in sources :

Example 6 with Organization

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

the class ReportBean method getOrganizations.

public ArrayList<SelectItem> getOrganizations() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<Organization> refs = organizationDAO.search(new SortCriteria("name"));
    for (Organization ref : refs) {
        ret.add(new SelectItem(ref.getId().toString(), 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 7 with Organization

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

the class BillManagerTest method createOrganizationInContext.

private Organization createOrganizationInContext() {
    final Organization organization = new Organization();
    daoOrganization.insert(organization);
    return organization;
}
Also used : Organization(com.autentia.tnt.businessobject.Organization)

Example 8 with Organization

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

the class ContactBean method getAllOrganizations.

public List<SelectItem> getAllOrganizations() {
    final List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    final List<SelectItem> ret = new ArrayList<SelectItem>();
    ret.add(new SelectItem(null, FacesUtils.getMessage("contact.selectOneOrganization")));
    for (Organization ref : refs) {
        String name = ref.getName();
        if (name.length() > 97) {
            name = name.substring(0, 97) + "...";
        }
        ret.add(new SelectItem(ref, name));
    }
    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 9 with Organization

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

the class InteractionBean method onSelectedOrganizationSearchChanged.

public void onSelectedOrganizationSearchChanged(ValueChangeEvent event) {
    Organization now = (Organization) event.getNewValue();
    if (now == null)
        return;
    setSearchProjectValid(true);
    setSelectedOrganization(now);
    FacesUtils.renderResponse();
}
Also used : Organization(com.autentia.tnt.businessobject.Organization)

Example 10 with Organization

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

the class OfferBean method getOrganizations.

/* Offer - generated by stajanov (do not edit/delete) */
/**
 * Get the list of all organizations
 *
 * @return the list of all organizations
 */
public List<SelectItem> getOrganizations() {
    List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (Organization ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    ret.add(0, new SelectItem(""));
    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)

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