@Override protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException { WhiteBoardQuestionConfigVo whiteBoardQuestToSave = populateDataFromScreen(form.getGlobalContext().Emergency.getWhiteBoardQuestionConfig()); String[] errors = getUIErrors(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return ; } form.getGlobalContext().Emergency.setWhiteBoardQuestionConfig(whiteBoardQuestToSave); engine.close(DialogResult.OK); }
private void addRowToQuestionsGrid(WhiteBoardQuestionConfigVo whiteBoardQuestionConfig) { if (whiteBoardQuestionConfig==null) return; grdConfigurableQuestionsRow row = form.grdConfigurableQuestions().getRows().newRow(); row.setcolText(whiteBoardQuestionConfig.getQuestionText()); row.setcolAnswerType(whiteBoardQuestionConfig.getAnswerType()!=null ? whiteBoardQuestionConfig.getAnswerType().toString(): null); row.setcolWidth(whiteBoardQuestionConfig.getColumnWidth()!=null ? whiteBoardQuestionConfig.getColumnWidth().toString(): null); row.setcolGenderSpecific(whiteBoardQuestionConfig.getGenderSpecific()!=null ? whiteBoardQuestionConfig.getGenderSpecific().toString(): null); row.setcolAgeRangeMin(whiteBoardQuestionConfig.getAgeRangeMin()!=null ? whiteBoardQuestionConfig.getAgeRangeMin().toString(): null); row.setcolAgeRangeMax(whiteBoardQuestionConfig.getAgeRangeMax()!=null ? whiteBoardQuestionConfig.getAgeRangeMax().toString() : null); row.setValue(whiteBoardQuestionConfig); }
private void populateScreenFromData(WhiteBoardQuestionConfigVo whiteBoardQuestionConfig) { clearScreen(); if (whiteBoardQuestionConfig==null) return; form.txtQuestionText().setValue(whiteBoardQuestionConfig.getQuestionText()); form.txtColumnText().setValue(whiteBoardQuestionConfig.getColumnHeaderText()); form.cmbAnswerType().setValue(whiteBoardQuestionConfig.getAnswerType()); populateAnswerOptionsGrid(whiteBoardQuestionConfig.getOptions()); form.intColumnWidth().setValue(whiteBoardQuestionConfig.getColumnWidth()); form.cmbGender().setValue(whiteBoardQuestionConfig.getGenderSpecific()); form.irbAgeRange().setValue(new IntRange(whiteBoardQuestionConfig.getAgeRangeMin(),whiteBoardQuestionConfig.getAgeRangeMax())); }
private void updateRowToQuestionsGrid(WhiteBoardQuestionConfigVo whiteBoardQuestionConfig) { grdConfigurableQuestionsRow row = form.grdConfigurableQuestions().getSelectedRow(); row.setcolText(whiteBoardQuestionConfig.getQuestionText()); row.setcolAnswerType(whiteBoardQuestionConfig.getAnswerType()!=null ? whiteBoardQuestionConfig.getAnswerType().toString(): null); row.setcolWidth(whiteBoardQuestionConfig.getColumnWidth()!=null ? whiteBoardQuestionConfig.getColumnWidth().toString(): null); row.setcolGenderSpecific(whiteBoardQuestionConfig.getGenderSpecific()!=null ? whiteBoardQuestionConfig.getGenderSpecific().toString(): null); row.setcolAgeRangeMin(whiteBoardQuestionConfig.getAgeRangeMin()!=null ? whiteBoardQuestionConfig.getAgeRangeMin().toString(): null); row.setcolAgeRangeMax(whiteBoardQuestionConfig.getAgeRangeMax()!=null ? whiteBoardQuestionConfig.getAgeRangeMax().toString() : null); row.setValue(whiteBoardQuestionConfig); }
private void addColumnQuestion(WhiteBoardQuestionConfigVo whiteBoardQuestionConfigVo) { DynamicGridColumn column = form.dyngrdWhiteBoard().getColumns().newColumn(whiteBoardQuestionConfigVo.getColumnHeaderText()); column.setWidth(whiteBoardQuestionConfigVo.getColumnWidth()); column.setIdentifier(whiteBoardQuestionConfigVo); }