Search in sources :

Example 1 with Province

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

the class UserBean method getProvinces.

/**
 * Get the list of all provinces
 *
 * @return the list of all provinces
 */
public List<SelectItem> getProvinces() {
    List<Province> refs = ProvinceManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (Province 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) Province(com.autentia.tnt.businessobject.Province)

Example 2 with Province

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

the class PositionBean method getProvinces.

/**
 * Gets all provinces
 *
 * @return
 */
public List<SelectItem> getProvinces() {
    List<Province> refs = ProvinceManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    ret.add(new SelectItem(null, FacesUtils.getMessage("seleccion_sinSeleccion")));
    for (Province 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) Province(com.autentia.tnt.businessobject.Province)

Example 3 with Province

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

the class ContactBean method getProvinces.

public List<SelectItem> getProvinces() {
    List<Province> refs = ProvinceManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (Province 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) Province(com.autentia.tnt.businessobject.Province)

Aggregations

Province (com.autentia.tnt.businessobject.Province)3 SortCriteria (com.autentia.tnt.dao.SortCriteria)3 ArrayList (java.util.ArrayList)3 SelectItem (javax.faces.model.SelectItem)3