nameCell.setClasses(getCurricularCourseNameClasses());
final HtmlTableCell checkBoxCell = htmlTableRow.createCell();
checkBoxCell.setClasses(getCurricularCourseCheckBoxClasses());
final HtmlCheckBox checkBox =
new HtmlCheckBox(dismissalBean.containsDismissalOrOptionalDismissal(curricularCourse));
checkBox.setName("curricularCourseCheckBox" + curricularCourse.getExternalId());
if (curricularCourse.isOptionalCurricularCourse()) {
final OptionalCurricularCourse optionalCurricularCourse = (OptionalCurricularCourse) curricularCourse;
checkBox.setUserValue(new DismissalBean.SelectedOptionalCurricularCourse(optionalCurricularCourse,
studentCurricularPlan).getKey());
checkBoxCell.setBody(checkBox);
optionalCurricularCoursesController.addCheckBox(checkBox);
} else {
checkBox.setUserValue(new DismissalBean.SelectedCurricularCourse(curricularCourse, studentCurricularPlan)
.getKey());
checkBoxCell.setBody(checkBox);
curricularCoursesController.addCheckBox(checkBox);
}
}