private void populateAnswerOptionsGrid(AnswerOptionForEDWhiteboardConfigVoCollection collAnsOptions) { if (collAnsOptions==null) return; for (int i=0;i<collAnsOptions.size();i++) { AnswerOptionForEDWhiteboardConfigVo ansOption = collAnsOptions.get(i); if (ansOption==null) continue; grdAnswerOptionsRow row = form.grdAnswerOptions().getRows().newRow(); row.setcolOptionText(ansOption.getOptionText()); row.setcolOptionDesc(ansOption.getOptionDescription()); row.setValue(ansOption); } }
private AnswerOptionForEDWhiteboardConfigVoCollection populateOptionsFromGrid() { AnswerOptionForEDWhiteboardConfigVoCollection voColl = new AnswerOptionForEDWhiteboardConfigVoCollection(); for (int i = 0; i < form.grdAnswerOptions().getRows().size(); i++) { grdAnswerOptionsRow row = form.grdAnswerOptions().getRows().get(i); AnswerOptionForEDWhiteboardConfigVo voAnswerOption = row.getValue() != null ? row.getValue() : new AnswerOptionForEDWhiteboardConfigVo(); voAnswerOption.setOptionText(row.getcolOptionText()); voAnswerOption.setOptionDescription(row.getcolOptionDesc()); voColl.add(voAnswerOption); } return voColl; }