/** * derived property * * @return true if there are questions */ public boolean isHasQuestions() { try { for (int i = 0; i < sections.size(); i++) { SectionBean s = (SectionBean) sections.get(i); if (s.getItems().size() > 0) { return true; } } } catch (RuntimeException ex) { return false; } return false; }
/** * Derived property. * * @return ArrayList of model SelectItems */ public ArrayList getSectionSelectList() { ArrayList list = new ArrayList(); if (sections == null) return list; for (int i = 0; i < sections.size(); i++) { SelectItem selection = new SelectItem(); SectionBean sBean = (SectionBean) sections.get(i); selection.setLabel(sBean.getSectionTitle()); selection.setValue(sBean.getSectionIdent()); list.add(selection); } return list; }