Package pt.ist.fenixWebFramework.renderers.components

Examples of pt.ist.fenixWebFramework.renderers.components.HtmlCheckBox


        }

        final HtmlTableCell checkBoxCell = groupHeaderRow.createCell();
        checkBoxCell.setClasses("aright");

        final HtmlCheckBox checkBox = new HtmlCheckBox(true) {
            @Override
            public void setChecked(boolean checked) {
                if (isDisabled()) {
                    super.setChecked(true);
                } else {
                    super.setChecked(checked);
                }
            }
        };

        MetaObject enrolmentMetaObject =
                MetaObjectFactory.createObject(studentCurriculumGroupBean.getCurriculumModule(),
                        new Schema(CurriculumGroup.class));
        checkBox.setName("enrolmentCheckBox" + studentCurriculumGroupBean.getCurriculumModule().getExternalId());
        checkBox.setUserValue(enrolmentMetaObject.getKey().toString());
        checkBoxCell.setBody(checkBox);

        if (studentCurriculumGroupBean.isToBeDisabled()) {
            checkBox.setDisabled(true);
        } else {
            enrollmentsController.addCheckBox(checkBox);
        }
    }
View Full Code Here


                ectsCell.setBody(new HtmlText(ects.toString()));

                HtmlTableCell checkBoxCell = htmlTableRow.createCell();
                checkBoxCell.setClasses(getRenderer().getCurricularCourseToEnrolCheckBoxClasses());

                HtmlCheckBox checkBox = new HtmlCheckBox(false);
                checkBox.setName("degreeModuleToEnrolCheckBox" + degreeModuleToEvaluate.getKey());
                checkBox.setUserValue(degreeModuleToEvaluate.getKey());
                getDegreeModulesToEvaluateController().addCheckBox(checkBox);
                checkBoxCell.setBody(checkBox);
            } else {
                final HtmlTableCell cell = htmlTableRow.createCell();
                cell.setClasses(getRenderer().getCurricularCourseToEnrolEctsClasses());
View Full Code Here

        ectsCell.setBody(new HtmlText(ects.toString()));

        MetaObject enrolmentMetaObject = MetaObjectFactory.createObject(enrolment, new Schema(Enrolment.class));

        HtmlCheckBox checkBox = new HtmlCheckBox(true);
        checkBox.setName("enrolmentCheckBox" + enrolment.getExternalId());
        checkBox.setUserValue(enrolmentMetaObject.getKey().toString());
        enrollmentsController.addCheckBox(checkBox);

        HtmlTableCell cellCheckBox = htmlTableRow.createCell();
        cellCheckBox.setClasses(enrolmentCheckBoxClasses);
        cellCheckBox.setBody(checkBox);
View Full Code Here

        htmlTableRow.setClasses(getRenderer().getGroupRowClasses());
        htmlTableRow.createCell().setBody(new HtmlText(degreeModuleToEnrol.getContext().getChildDegreeModule().getName()));
        HtmlTableCell cell = htmlTableRow.createCell();
        cell.setClasses("aright");

        HtmlCheckBox checkBox = new HtmlCheckBox(false);
        final String name =
                "degreeModuleToEnrolCheckBox" + degreeModuleToEnrol.getContext().getExternalId().toString() + ":"
                        + degreeModuleToEnrol.getCurriculumGroup().getExternalId().toString();
        checkBox.setName(name);
        checkBox.setUserValue(degreeModuleToEnrol.getKey());
        getDegreeModulesToEvaluateController().addCheckBox(checkBox);
        cell.setBody(checkBox);

        if (getRenderer().isEncodeGroupRules()) {
            encodeCurricularRules(groupTable, degreeModuleToEnrol);
View Full Code Here

                ectsCell.setBody(new HtmlText(ects.toString()));

                HtmlTableCell checkBoxCell = htmlTableRow.createCell();
                checkBoxCell.setClasses(getRenderer().getCurricularCourseToEnrolCheckBoxClasses());

                HtmlCheckBox checkBox = new HtmlCheckBox(false);
                checkBox.setName("degreeModuleToEnrolCheckBox" + degreeModuleToEvaluate.getKey());
                checkBox.setUserValue(degreeModuleToEvaluate.getKey());
                getDegreeModulesToEvaluateController().addCheckBox(checkBox);
                checkBoxCell.setBody(checkBox);
            } else {
                final HtmlTableCell cell = htmlTableRow.createCell();
                cell.setClasses(getRenderer().getCurricularCourseToEnrolEctsClasses());
View Full Code Here

        htmlTableRow.setClasses(getRenderer().getGroupRowClasses());
        htmlTableRow.createCell().setBody(new HtmlText("Other Curricular Units", false));
        HtmlTableCell cell = htmlTableRow.createCell();
        cell.setClasses("aright");

        HtmlCheckBox checkBox = new HtmlCheckBox(false);
        final String name = "degreeModuleToEnrolCheckBox";
        checkBox.setName(name);
        checkBox.setUserValue("true");
        checkBox.setChecked(true);

        cell.setBody(checkBox);
        groupTable = createCoursesTable(container, 0);
        NoCourseGroupCurriculumGroup group =
                getBolonhaStudentEnrollmentBean().getStudentCurricularPlan().getNoCourseGroupCurriculumGroup(
                        NoCourseGroupCurriculumGroupType.STANDALONE);
        HashSet<CurricularCourse> set = new HashSet<CurricularCourse>();
        ErasmusBolonhaStudentEnrollmentBean erasmusBolonhaStudentEnrollmentBean =
                (ErasmusBolonhaStudentEnrollmentBean) getBolonhaStudentEnrollmentBean();
        set.addAll(erasmusBolonhaStudentEnrollmentBean.getCandidacy().getCurricularCoursesSet());
        for (Enrolment enrolment : group.getEnrolments()) {
            set.add(enrolment.getCurricularCourse());
        }

        for (CurricularCourse curricularCourse : set) {
            if (erasmusBolonhaStudentEnrollmentBean.getStudentCurricularPlan().getEnrolmentByCurricularCourseAndExecutionPeriod(
                    curricularCourse, erasmusBolonhaStudentEnrollmentBean.getExecutionPeriod()) != null) {
                if (!group.hasEnrolmentWithEnroledState(curricularCourse,
                        erasmusBolonhaStudentEnrollmentBean.getExecutionPeriod())) {

                    continue;
                }
            }

            if (!isContextValid(curricularCourse)) {
                continue;
            }

            htmlTableRow = groupTable.createRow();
            HtmlTableCell cellName = htmlTableRow.createCell();
            cellName.setClasses(getRenderer().getCurricularCourseToEnrolNameClasses());

            String degreeName = curricularCourse.getName();

            if (isAcademicRelationsOfficeMember() && curricularCourse instanceof CurricularCourse) {
                if (!StringUtils.isEmpty(curricularCourse.getCode())) {
                    degreeName = curricularCourse.getCode() + " - " + degreeName;
                }

                degreeName +=
                        " (" + BundleUtil.getString(Bundle.STUDENT, "label.grade.scale") + " - "
                                + curricularCourse.getGradeScaleChain().getDescription() + ") ";
            }

            cellName.setBody(new HtmlText(degreeName));

            // Year
            final HtmlTableCell yearCell = htmlTableRow.createCell();
            yearCell.setClasses(getRenderer().getCurricularCourseToEnrolYearClasses());
            yearCell.setColspan(2);
            yearCell.setBody(new HtmlText(getBolonhaStudentEnrollmentBean().getExecutionPeriod().getQualifiedName()));

            final HtmlTableCell ectsCell = htmlTableRow.createCell();
            ectsCell.setClasses(getRenderer().getCurricularCourseToEnrolEctsClasses());

            final StringBuilder ects = new StringBuilder();
            ects.append(curricularCourse.getEctsCredits()).append(" ")
                    .append(BundleUtil.getString(Bundle.STUDENT, "label.credits.abbreviation"));
            ectsCell.setBody(new HtmlText(ects.toString()));

            HtmlTableCell checkBoxCell = htmlTableRow.createCell();
            checkBoxCell.setClasses(getRenderer().getCurricularCourseToEnrolCheckBoxClasses());

            checkBox = new HtmlCheckBox(false);
            checkBox.setName("extraCurricularEnrolments" + curricularCourse.getClass().getCanonicalName() + ":"
                    + curricularCourse.getExternalId());
            checkBox.setUserValue(curricularCourse.getClass().getCanonicalName() + ":" + curricularCourse.getExternalId());
            checkBoxCell.setBody(checkBox);
            controller.addCheckBox(checkBox);

            if (group.hasEnrolmentWithEnroledState(curricularCourse, erasmusBolonhaStudentEnrollmentBean.getExecutionPeriod())) {
                cellName.setClasses(getRenderer().getEnrolmentNameClasses());
                yearCell.setClasses(getRenderer().getEnrolmentYearClasses());
                ectsCell.setClasses(getRenderer().getEnrolmentEctsClasses());
                checkBoxCell.setClasses(getRenderer().getEnrolmentCheckBoxClasses());

                checkBox.setChecked(true);
            }

        }

        return container;
View Full Code Here

            createWorkingStudentSearch(row, headerRow);

            HtmlTableRow row2 = htmlTable.createRow();
            HtmlTableCell photoCell = row2.createCell();
            photoCell.setColspan(headerRow.getCells().size());
            HtmlCheckBox checkBox =
                    new HtmlCheckBox(BundleUtil.getString(Bundle.APPLICATION, "label.viewPhoto"), bean.getViewPhoto());
            checkBox.bind(getInputContext().getMetaObject(), "viewPhoto");
            photoCell.setBody(checkBox);

            HtmlTableRow row3 = htmlTable.createRow();
            HtmlTableCell submitCell = row3.createCell();
            submitCell.setColspan(headerRow.getCells().size());
View Full Code Here

        private void createWorkingStudentSearch(HtmlTableRow row, HtmlTableRow headerRow) {
            headerRow.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.workingStudents"));

            HtmlCheckBoxList workingStudentCheckBoxList = new HtmlCheckBoxList();
            for (WorkingStudentSelectionType workingStudentSelectionType : WorkingStudentSelectionType.values()) {
                HtmlCheckBox option =
                        workingStudentCheckBoxList.addOption(
                                new HtmlLabel(BundleUtil.getString(Bundle.ENUMERATION,
                                        workingStudentSelectionType.getQualifiedName())), workingStudentSelectionType.name());
                option.setChecked(bean.getWorkingStudentTypes().contains(workingStudentSelectionType));
            }
            row.createCell().setBody(workingStudentCheckBoxList);

            workingStudentCheckBoxList.bind(getInputContext().getMetaObject(), "workingStudentTypes");
            workingStudentCheckBoxList.setConverter(new EnumArrayConverter(WorkingStudentSelectionType.class));
View Full Code Here

            headerRow.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.selectShift"));

            HtmlCheckBoxList shiftCheckBoxList = new HtmlCheckBoxList();
            for (Shift shift : bean.getExecutionCourse().getAssociatedShifts()) {
                MetaObject shiftMetaObject = MetaObjectFactory.createObject(shift, new Schema(Shift.class));
                HtmlCheckBox option =
                        shiftCheckBoxList.addOption(new HtmlLabel(shift.getPresentationName()), shiftMetaObject.getKey()
                                .toString());
                option.setChecked(bean.getShifts().contains(shift));
            }
            row.createCell().setBody(shiftCheckBoxList);

            shiftCheckBoxList.bind(getInputContext().getMetaObject(), "shifts");
            shiftCheckBoxList.setConverter(new DomainObjectKeyArrayConverter());
View Full Code Here

            HtmlCheckBoxList dcpCheckBoxList = new HtmlCheckBoxList();
            for (DegreeCurricularPlan degreeCurricularPlan : bean.getExecutionCourse().getAttendsDegreeCurricularPlans()) {
                MetaObject dcpMetaObject =
                        MetaObjectFactory.createObject(degreeCurricularPlan, new Schema(DegreeCurricularPlan.class));
                HtmlCheckBox option =
                        dcpCheckBoxList.addOption(new HtmlLabel(degreeCurricularPlan.getName()), dcpMetaObject.getKey()
                                .toString());
                option.setChecked(bean.getDegreeCurricularPlans().contains(degreeCurricularPlan));
            }
            row.createCell().setBody(dcpCheckBoxList);

            dcpCheckBoxList.bind(getInputContext().getMetaObject(), "degreeCurricularPlans");
            dcpCheckBoxList.setConverter(new DomainObjectKeyArrayConverter());
View Full Code Here

TOP

Related Classes of pt.ist.fenixWebFramework.renderers.components.HtmlCheckBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.