private void populateQuestionsGrid(AdmissionDetailsQuestionsVoCollection vocoll) { if (vocoll != null) { for (int j=0; j<vocoll.size();j++) { for (int i=0; i<form.dynQuestions().getRows().size();i++) { DynamicGridRow dyrow = form.dynQuestions().getRows().get(i); if (dyrow.getValue().equals(vocoll.get(j).getQuestion())) { dyrow.getCells().get(getColumn(ANSWERS_COLUMN)).setValue(vocoll.get(j).getAnswer()); } } } } }
private AdmissionDetailsQuestionsVo questionRecorded(AdmissionDetailsQuestionsVoCollection voCol,AdmissionQuestion voLkup) { if (voCol == null) return null; for(int i=0;i<voCol.size();i++) { if ((voCol.get(i).getQuestionIsNotNull() && voCol.get(i).getQuestion().equals(voLkup))) return voCol.get(i); } return null; }
private int questionRecordedIndex(AdmissionDetailsQuestionsVoCollection voCol,AdmissionQuestion voLkup) { for(int i=0;i<voCol.size();i++) { if (voCol.get(i).getQuestion().equals(voLkup)) return i; } return -1; }