Search in sources :

Example 11 with Contact

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

the class TagBean method getContactTagss.

/**
 * Get the list of all contactTagss
 *
 * @return the list of all contactTagss
 */
public List<SelectItem> getContactTagss() {
    List<Contact> refs = ContactManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    List<SelectItem> ret = new ArrayList<SelectItem>();
    for (Contact ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) Contact(com.autentia.tnt.businessobject.Contact)

Example 12 with Contact

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

the class TagBean method getAllContacts.

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

Example 13 with Contact

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

the class TagBean method editContactTags.

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

Example 14 with Contact

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

the class TagBean method getContactTagsSelected.

// Getters to list possible values of related entities
/**
 * Get the list of all contactTags selected
 *
 * @return the list of all contactTags selected
 */
public List<SelectItem> getContactTagsSelected() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<Contact> refs = this.getContactTags();
    for (Contact ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) Contact(com.autentia.tnt.businessobject.Contact)

Example 15 with Contact

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

the class ContactBean method create.

/**
 * Go to create page
 *
 * @return forward to CREATE page
 */
public String create() {
    contact = new Contact();
    contact.addOwner(authManager.getCurrentPrincipal().getUser());
    return NavigationResults.CREATE;
}
Also used : Contact(com.autentia.tnt.businessobject.Contact)

Aggregations

Contact (com.autentia.tnt.businessobject.Contact)15 ArrayList (java.util.ArrayList)7 SelectItem (javax.faces.model.SelectItem)6 SortCriteria (com.autentia.tnt.dao.SortCriteria)5 EntityChange (com.autentia.tnt.tracking.EntityChange)2 HashSet (java.util.HashSet)2 Tag (com.autentia.tnt.businessobject.Tag)1 ContactSearch (com.autentia.tnt.dao.search.ContactSearch)1 UIData (javax.faces.component.UIData)1