public List<SelectItem> getSelectedItemParroquia() { try { List<SelectItem> items = new ArrayList<>(); for (AdmDivisionPolitica obj : canton.getAdmDivisionPoliticaList()) { items.add(new SelectItem(obj, obj.getNombre())); } return items; } catch (Exception e) { log.error("getSelectedItemParroquia() {} ", e.getMessage()); } return null; }
public List<SelectItem> getSelectedItemProvincia() { try { List<AdmDivisionPolitica> datos = admin.listarNullOrdenada( AdmDivisionPolitica.class, "admDivisionPolitica", "nombre", true); List<SelectItem> items = new ArrayList<>(); for (AdmDivisionPolitica obj : datos) { items.add(new SelectItem(obj, obj.getNombre())); } return items; } catch (Exception e) { log.error("getSelectedItemProvincia() {} ", e.getMessage()); } return null; }