fillChosenRoomsIDs();  if (this.getOrderCriteria() == 0) { Collections.sort(this.availableInfoRoom, new BeanComparator("capacidadeExame")); Collections.reverse(this.availableInfoRoom); } else if (this.getOrderCriteria() == 1) { Collections.sort(this.availableInfoRoom, new BeanComparator("edificio")); } else if (this.getOrderCriteria() == 2) { Collections.sort(this.availableInfoRoom, new BeanComparator("tipo")); }  List<SelectItem> items = new ArrayList<SelectItem>(this.availableInfoRoom.size()); for (InfoRoom infoRoom : (List<InfoRoom>) this.availableInfoRoom) { StringBuffer label = new StringBuffer(); label.append(infoRoom.getNome()); label.append("  ( "); label.append(infoRoom.getCapacidadeExame()); label.append(" "); label.append(this.labelVacancies); label.append(", "); label.append(infoRoom.getEdificio()); label.append(", "); label.append(getRoomType(infoRoom.getTipo())); label.append(" )");  items.add(new SelectItem(infoRoom.getIdInternal(), label.toString())); }  this.roomsSelectItems = items;
items.add(new SelectItem(infoRoom.getIdInternal(), label.toString()));
    public List<SelectItem> getRoomsSelectItems() throws FenixFilterException, FenixServiceException {        if (this.roomsSelectItems == null) {            if (this.availableInfoRoom == null) {                Calendar examDate = Calendar.getInstance();                examDate.set(Calendar.YEAR, getYear());                examDate.set(Calendar.MONTH, getMonth() - 1);                examDate.set(Calendar.DAY_OF_MONTH, getDay());                DiaSemana dayOfWeek = new DiaSemana(examDate.get(Calendar.DAY_OF_WEEK));                Calendar examStartTime = Calendar.getInstance();                examStartTime.set(Calendar.HOUR_OF_DAY, getBeginHour());                examStartTime.set(Calendar.MINUTE, getBeginMinute());                Calendar examEndTime = Calendar.getInstance();                examEndTime.set(Calendar.HOUR_OF_DAY, getEndHour());                examEndTime.set(Calendar.MINUTE, getEndMinute());                Object args[] = { examDate, examDate, examStartTime, examEndTime, dayOfWeek, null, null,                        Integer.valueOf(RoomOccupation.DIARIA), null, Boolean.FALSE };                this.availableInfoRoom = (List<InfoRoom>) ServiceUtils.executeService(this                        .getUserView(), "ReadAvailableRoomsForExam", args);            }            fillChosenRoomsIDs();                        if (this.getOrderCriteria() == 0) {                Collections.sort(this.availableInfoRoom, new BeanComparator("capacidadeExame"));                Collections.reverse(this.availableInfoRoom);            } else if (this.getOrderCriteria() == 1) {                Collections.sort(this.availableInfoRoom, new BeanComparator("edificio"));            } else if (this.getOrderCriteria() == 2) {                Collections.sort(this.availableInfoRoom, new BeanComparator("tipo"));            }                        List<SelectItem> items = new ArrayList<SelectItem>(this.availableInfoRoom.size());            for (InfoRoom infoRoom : (List<InfoRoom>) this.availableInfoRoom) {                StringBuffer label = new StringBuffer();                label.append(infoRoom.getNome());                label.append("  ( ");                label.append(infoRoom.getCapacidadeExame());                label.append(" ");                label.append(this.labelVacancies);                label.append(", ");                label.append(infoRoom.getEdificio());                label.append(", ");                label.append(getRoomType(infoRoom.getTipo()));                label.append(" )");                items.add(new SelectItem(infoRoom.getIdInternal(), label.toString()));            }            this.roomsSelectItems = items;        }        return this.roomsSelectItems;    }