Package pt.ist.fenixWebFramework.renderers.components

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


                rowSpan = 2;
            }

            HtmlTableRow row1 = tableHeader.createRow();
            if (bean.getViewPhoto()) {
                HtmlTableCell photoCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.photo"));
                photoCell.setRowspan(rowSpan);
            }
            HtmlTableCell usernameCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.username"));
            usernameCell.setRowspan(rowSpan);

            HtmlTableCell numberCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.number"));
            numberCell.setRowspan(rowSpan);

            HtmlTableCell numberOfEnrolmentsCell =
                    row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.numberOfEnrollments"));
            numberOfEnrolmentsCell.setRowspan(rowSpan);

            HtmlTableCell enrolmentStateCell1 =
                    row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.attends.enrollmentState"));
            enrolmentStateCell1.setRowspan(rowSpan);

            HtmlTableCell degreeCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.Degree"));
            degreeCell.setRowspan(rowSpan);

            HtmlTableCell registrationStateCell =
                    row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.registration.state"));
            registrationStateCell.setRowspan(rowSpan);

            HtmlTableCell nameCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.name"));
            nameCell.setRowspan(rowSpan);

            if (!groupings.isEmpty()) {
                HtmlTableCell groupingCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.projectGroup"));
                groupingCell.setColspan(groupings.size());
            }

            HtmlTableCell emailCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.mail"));
            emailCell.setRowspan(rowSpan);

            if (!shiftTypes.isEmpty()) {
                HtmlTableCell shiftCell = row1.createCell(BundleUtil.getString(Bundle.APPLICATION, "label.attends.shifts"));
                shiftCell.setColspan(shiftTypes.size());
            }

            HtmlTableRow row2 = tableHeader.createRow();
            for (Grouping grouping : groupings) {
                row2.createCell(grouping.getName());
View Full Code Here


            HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());
            htmlTableRow.createCell().setBody(new HtmlText(curriculumModuleBean.getCurriculumModule().getName().getContent()));

            HtmlTableCell checkBoxCell = htmlTableRow.createCell();
            checkBoxCell.setClasses("aright");

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

            if (!curriculumModuleBean.getGroupsEnroled().isEmpty()
                    || !curriculumModuleBean.getCurricularCoursesEnroled().isEmpty()) {
                checkBox.setDisabled(true);
            } else {
View Full Code Here

            groupTable.setClasses(getTablesClasses());
            groupTable.setStyle("width: " + (getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");
            HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());
            htmlTableRow.createCell().setBody(new HtmlText(degreeModuleToEnrol.getContext().getChildDegreeModule().getName()));
            HtmlTableCell checkBoxCell = htmlTableRow.createCell();
            checkBoxCell.setClasses("aright");

            HtmlCheckBox checkBox = new HtmlCheckBox(false);
            checkBox.setName("degreeModuleToEnrolCheckBox" + degreeModuleToEnrol.getContext().getExternalId() + ":"
                    + degreeModuleToEnrol.getCurriculumGroup().getExternalId());
            checkBox.setUserValue(degreeModuleToEnrol.getKey());
            degreeModulesToEnrolController.addCheckBox(checkBox);
            checkBoxCell.setBody(checkBox);
        }
View Full Code Here

            for (DegreeModuleToEnrol degreeModuleToEnrol : coursesToEnrol) {
                CurricularCourse curricularCourse = (CurricularCourse) degreeModuleToEnrol.getContext().getChildDegreeModule();

                HtmlTableRow htmlTableRow = groupTable.createRow();
                HtmlTableCell cellName = htmlTableRow.createCell();
                cellName.setClasses(getCurricularCourseNameClasses());
                cellName.setBody(new HtmlText(curricularCourse.getName()));

                // Year
                final HtmlTableCell yearCell = htmlTableRow.createCell();
                yearCell.setClasses(getCurricularCourseYearClasses());
                yearCell.setColspan(2);

                final StringBuilder year = new StringBuilder();
                year.append(degreeModuleToEnrol.getContext().getCurricularPeriod().getFullLabel());
                yearCell.setBody(new HtmlText(year.toString()));

                if (!curricularCourse.isOptionalCurricularCourse()) {
                    // Ects
                    final HtmlTableCell ectsCell = htmlTableRow.createCell();
                    ectsCell.setClasses(getCurricularCourseEctsClasses());

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

                    HtmlTableCell checkBoxCell = htmlTableRow.createCell();
                    checkBoxCell.setClasses(getCurricularCourseCheckBoxClasses());

                    HtmlCheckBox checkBox = new HtmlCheckBox(false);
                    checkBox.setName("degreeModuleToEnrolCheckBox" + degreeModuleToEnrol.getContext().getExternalId() + ":"
                            + degreeModuleToEnrol.getCurriculumGroup().getExternalId());
                    checkBox.setUserValue(degreeModuleToEnrol.getKey());
                    degreeModulesToEnrolController.addCheckBox(checkBox);
                    checkBoxCell.setBody(checkBox);
                } else {
                    final HtmlTableCell cell = htmlTableRow.createCell();
                    cell.setClasses(getCurricularCourseEctsClasses());
                    cell.setBody(new HtmlText(""));

                    HtmlTableCell linkTableCell = htmlTableRow.createCell();
                    linkTableCell.setClasses(getCurricularCourseCheckBoxClasses());

                    final HtmlLink htmlLink = new HtmlLink();
                    htmlLink.setText(BundleUtil.getString(Bundle.ACADEMIC, "link.option.choose.curricular.course"));
                    htmlLink.setUrl(getLinkURL());
                    htmlLink.setParameter("scpID", studentEnrolmentBean.getStudentCurricularPlan().getExternalId());
                    htmlLink.setParameter("executionPeriodID", studentEnrolmentBean.getExecutionPeriod().getExternalId());
                    htmlLink.setParameter("curriculumGroupID", degreeModuleToEnrol.getCurriculumGroup().getExternalId());
                    htmlLink.setParameter("contextID", degreeModuleToEnrol.getContext().getExternalId());
                    linkTableCell.setBody(htmlLink);
                }
            }
        }
View Full Code Here

            }
        }

        private void generateEnrolment(final HtmlTable groupTable, Enrolment enrolment) {
            HtmlTableRow htmlTableRow = groupTable.createRow();
            HtmlTableCell cellName = htmlTableRow.createCell();
            cellName.setClasses(getEnrolmentNameClasses());
            cellName.setBody(new HtmlText(enrolment.getName().getContent()));

            // Year
            final HtmlTableCell yearCell = htmlTableRow.createCell();
            yearCell.setClasses(getEnrolmentYearClasses());

            final StringBuilder year = new StringBuilder();
            year.append(enrolment.getExecutionPeriod().getExecutionYear().getYear());
            yearCell.setBody(new HtmlText(year.toString()));

            // Semester
            final HtmlTableCell semesterCell = htmlTableRow.createCell();
            semesterCell.setClasses(getEnrolmentSemesterClasses());

            final StringBuilder semester = new StringBuilder();
            semester.append(enrolment.getExecutionPeriod().getSemester().toString());
            semester.append(" ");
            semester.append(BundleUtil.getString(Bundle.ENUMERATION, "SEMESTER.ABBREVIATION"));
            semesterCell.setBody(new HtmlText(semester.toString()));

            // Ects
            final HtmlTableCell ectsCell = htmlTableRow.createCell();
            ectsCell.setClasses(getEnrolmentEctsClasses());

            final StringBuilder ects = new StringBuilder();
            ects.append(enrolment.getCurricularCourse().getEctsCredits()).append(" ")
                    .append(BundleUtil.getString(Bundle.ACADEMIC, "credits.abbreviation"));
            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(getEnrolmentCheckBoxClasses());
            cellCheckBox.setBody(checkBox);
        }
View Full Code Here

                int rowIndex = 0;
                for (MetaObject meta : contacts) {
                    HtmlTableRow row = new HtmlTableRow();
                    row.setClasses(getRowClasses());
                    if (rowIndex == 0) {
                        HtmlTableCell left = row.createCell(CellType.HEADER);
                        left.setClasses(getLeftColumnClasses());
                        left.setStyle(getLeftLineStyle());
                        left.setRowspan(contacts.size());
                        left.setBody(new HtmlText(RenderUtils.getResourceString(getBundle(), getLabel()) + ":"));
                    }
                    HtmlTableCell right = row.createCell();
                    right.setClasses(getRightColumnClasses());
                    right.setStyle(getRightLineStyle());
                    right.setBody(getValue((PartyContact) meta.getObject()));
                    span.addChild(row);
                    rowIndex++;
                }
                return span;
            }
View Full Code Here

                                    getCurrentOrFutureCoursePresentation(course, group, department.getDepartmentUnit());
                            if (getCourseNameClasses() != null) {
                                coursePresentation.setClasses(getCourseNameClasses());
                            }
                            courseRow.createCell().setBody(coursePresentation);
                            HtmlTableCell cell = courseRow.createCell();
                            cell.setBody(getLinks(course));
                            cell.setClasses("aright");
                        }
                    }
                    if (isShowOldCompetenceCourses()) {
                        for (CompetenceCourse course : group.getOldCompetenceCourses()) {
                            if (course.getCurricularStage().equals(stage)) {
                                HtmlTableRow courseRow = table.createRow();
                                HtmlComponent coursePresentation = getOldCoursePresentation(course);
                                if (getCourseNameClasses() != null) {
                                    coursePresentation.setClasses(getCourseNameClasses());
                                }
                                courseRow.createCell().setBody(coursePresentation);
                                HtmlTableCell cell = courseRow.createCell();
                                cell.setBody(getLinks(course));
                                cell.setClasses("aright");
                            }
                        }
                    }
                    courseContainer.addChild(table);
                    if (getTableClasses() != null) {
View Full Code Here

TOP

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

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.