Examples of HtmlText


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

            public HtmlComponent createComponent(Object object, Class type) {
                ExecutionSemester executionSemester = (ExecutionSemester) object;
                StringBuilder text = new StringBuilder();
                text.append(executionSemester.getExecutionYear().getYear()).append(", ");
                text.append(executionSemester.getSemester()).append(RenderUtils.getResourceString("label.semester.short"));
                return new HtmlText(text.toString());
            }
        };
    }
View Full Code Here

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

            HtmlBlockContainer container = new HtmlBlockContainer();
            if (dismissalBean == null
                    || dismissalBean.getExecutionPeriod() == null
                    || dismissalBean.getStudentCurricularPlan().getStartExecutionPeriod()
                            .isAfter(dismissalBean.getExecutionPeriod())) {
                return new HtmlText();
            }

            DismissalType dismissalTypeValue =
                    getDismissalType() == null ? dismissalBean.getDismissalType() : DismissalType.valueOf(getDismissalType());
View Full Code Here

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

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());

            final HtmlTableCell nameCell = htmlTableRow.createCell();
            nameCell.setBody(new HtmlText(curriculumGroup.getFullPath()));
            nameCell.setClasses(getGroupNameClasses());

            final HtmlTableCell radioButtonCell = htmlTableRow.createCell();
            final HtmlRadioButton radioButton = radioButtonGroup.createRadioButton();
            radioButton.setUserValue(MetaObjectFactory.createObject(curriculumGroup, new Schema(CurriculumGroup.class)).getKey()
View Full Code Here

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

                final String oneFullName = curricularCourse.getOneFullName(executionSemester);
                final String name =
                        " <span class='bold'>" + curricularCourse.getName(dismissalBean.getExecutionPeriod()) + "</span> ("
                                + oneFullName.substring(0, oneFullName.lastIndexOf(">")) + ")";
                final String codeAndname = StringUtils.isEmpty(code) ? name : code + " - " + name;
                nameCell.setBody(new HtmlText(codeAndname, false));

                nameCell.setClasses(getCurricularCourseNameClasses());

                final HtmlTableCell checkBoxCell = htmlTableRow.createCell();
                checkBoxCell.setClasses(getCurricularCourseCheckBoxClasses());
View Full Code Here

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

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());

            final HtmlTableCell nameCell = htmlTableRow.createCell();
            nameCell.setBody(new HtmlText(courseGroup.getName()));
            nameCell.setClasses(getGroupNameClasses());

            final HtmlTableCell currentCreditsCell = htmlTableRow.createCell();
            final double ectsCreditsForCourseGroup =
                    studentCurricularPlan.getCreditsConcludedForCourseGroup(courseGroup).doubleValue();
            if (ectsCreditsForCourseGroup == 0d) {
                currentCreditsCell.setBody(new HtmlText("ECTS:  -"));
            } else {
                currentCreditsCell.setBody(new HtmlText("ECTS: " + ectsCreditsForCourseGroup));
            }
            currentCreditsCell.setClasses("smalltxt");
            currentCreditsCell.setStyle("width: 6em;");

            final HtmlTableCell creditsMinCell = htmlTableRow.createCell();
            creditsMinCell.setBody(new HtmlText("Min: " + courseGroup.getMinEctsCredits(executionSemester)));
            creditsMinCell.setClasses("smalltxt");
            creditsMinCell.setStyle("width: 6em;");

            final HtmlTableCell creditsMaxCell = htmlTableRow.createCell();
            creditsMaxCell.setBody(new HtmlText("Max: " + courseGroup.getMaxEctsCredits(executionSemester)));
            creditsMaxCell.setClasses("smalltxt");
            creditsMaxCell.setStyle("width: 6em;");

            final HtmlTableCell radioButtonCell = htmlTableRow.createCell();
            final HtmlRadioButton radioButton = radioButtonGroup.createRadioButton();
View Full Code Here

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

        addTabsToRow(groupRow, level);

        // curricular period full label
        final HtmlTableCell cell1 = groupRow.createCell();
        cell1.setClasses(getLabelCellClass());
        cell1.setBody(new HtmlText(child.getFullLabel()));
        cell1.setColspan(getMaxColSpanForTextOnGroupsWithChilds());

        // Group
        final HtmlTableCell cell2 = groupRow.createCell();
        cell2.setClasses(getLabelCellClass());
        cell2.setBody(new HtmlText(getLabel("label.degreeCurricularPlan.renderer.group")));

        final HtmlTableCell cell3 = groupRow.createCell();
        cell3.setClasses(getLabelCellClass());
        cell3.setColspan(getMaxLineSize() - getMaxColSpanForTextOnGroupsWithChilds() - 1);
View Full Code Here

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

    }

    private void drawCourseGroupName(CourseGroup parentCourseGroup, HtmlTableRow row, int level) {
        final HtmlTableCell cell = row.createCell();
        cell.setClasses(getCurriclarCourseCellClass());
        cell.setBody(new HtmlText(parentCourseGroup.getName()));
    }
View Full Code Here

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

                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(degreeModuleToEvaluate.getYearFullLabel()));

            if (!degreeModuleToEvaluate.isOptionalCurricularCourse()) {
                // Ects
                final HtmlTableCell ectsCell = htmlTableRow.createCell();
                ectsCell.setClasses(getRenderer().getCurricularCourseToEnrolEctsClasses());

                final StringBuilder ects = new StringBuilder();
                ects.append(degreeModuleToEvaluate.getEctsCredits()).append(" ")
                        .append(BundleUtil.getString(Bundle.STUDENT, "label.credits.abbreviation"));
                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());
                cell.setBody(new HtmlText(""));

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

                final HtmlActionLink actionLink = new HtmlActionLink();
View Full Code Here

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

    @Override
    public HtmlComponent createComponent(Object object, Class type) {
        setBolonhaStudentEnrollmentBean((BolonhaStudentEnrollmentBean) object);

        if (getBolonhaStudentEnrollmentBean() == null) {
            return new HtmlText();
        }

        final HtmlBlockContainer container = new HtmlBlockContainer();

        HtmlMultipleHiddenField hiddenEnrollments = new HtmlMultipleHiddenField();
        hiddenEnrollments.bind(getRenderer().getInputContext().getMetaObject(), "curriculumModulesToRemove");
        hiddenEnrollments.setConverter(new DomainObjectKeyArrayConverter());
        hiddenEnrollments.setController(getEnrollmentsController());

        HtmlMultipleHiddenField hiddenDegreeModulesToEvaluate = new HtmlMultipleHiddenField();
        hiddenDegreeModulesToEvaluate.bind(getRenderer().getInputContext().getMetaObject(), "degreeModulesToEvaluate");
        hiddenDegreeModulesToEvaluate.setConverter(getBolonhaStudentEnrollmentBean().getDegreeModulesToEvaluateConverter());
        hiddenDegreeModulesToEvaluate.setController(getDegreeModulesToEvaluateController());

        HtmlMultipleHiddenField hiddenExtraCurricularEnrollments = new HtmlMultipleHiddenField();
        hiddenExtraCurricularEnrollments.bind(getRenderer().getInputContext().getMetaObject(), "extraCurricularEnrolments");
        hiddenExtraCurricularEnrollments.setConverter(new ErasmusExtraCurricularEnrolmentConverter());
        hiddenExtraCurricularEnrollments.setController(controller);

        container.addChild(hiddenEnrollments);
        container.addChild(hiddenDegreeModulesToEvaluate);
        container.addChild(hiddenExtraCurricularEnrollments);

        generateGroup(container, getBolonhaStudentEnrollmentBean().getStudentCurricularPlan(), getBolonhaStudentEnrollmentBean()
                .getRootStudentCurriculumGroupBean(), getBolonhaStudentEnrollmentBean().getExecutionPeriod(), 0);

        HtmlTable groupTable = createGroupTable(container, 0);

        HtmlTableRow htmlTableRow = groupTable.createRow();
        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);
View Full Code Here

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

                previousButton.setName(getLocalName(previousName));
                previousButton.setController(new PreviousController(page));
                container.addChild(previousButton);
            }

            container.addChild(new HtmlText(getPageContainerBean().getPage() + " / "
                    + getPageContainerBean().getNumberOfPages(getDefaultObjectsPerPage())));

            if (getPageContainerBean().hasNextPage(getDefaultObjectsPerPage())) {
                HtmlSubmitButton nextButton = new HtmlSubmitButton();
                nextButton.setText(RenderUtils.getResourceString(getBundle(), "pages.button.next"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.