Examples of HtmlLink


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

        return ((NoCourseGroupCurriculumGroup) curriculumGroup).isVisible();
    }

    private void addTabsToRow(final HtmlTableRow row, final int level) {
        for (int i = 0; i < level; i++) {
            HtmlLink link = new HtmlLink();
            link.setModuleRelative(false);
            link.setUrl(StudentCurricularPlanLayout.SPACER_IMAGE_PATH);

            final HtmlImage spacerImage = new HtmlImage();
            spacerImage.setSource(link.calculateUrl());

            final HtmlTableCell tabCell = row.createCell();
            tabCell.setClasses(getTabCellClass());
            tabCell.setBody(spacerImage);
        }
View Full Code Here

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

                HtmlImage img = new HtmlImage();
                img.setSource(RenderUtils.getContextRelativePath("") + "/publico/viewHomepage.do?method=emailPng&amp;email="
                        + email.getExternalId());
                span.addChild(img);
            } else {
                HtmlLink link = new HtmlLink();
                link.setModuleRelative(false);
                link.setContextRelative(false);
                link.setUrl("mailto:" + email.getValue());
                link.setBody(new HtmlText(email.getValue()));
                span.addChild(link);
            }
        } else if (contact instanceof WebAddress) {
            HtmlLink link = new HtmlLink();
            link.setModuleRelative(false);
            link.setContextRelative(false);
            link.setUrl(((WebAddress) contact).getPresentationValue());
            link.setBody(new HtmlText(((WebAddress) contact).getPresentationValue()));
            span.addChild(link);
        }
        if (showType || (showDefault && contact.isDefault())) {
            StringBuilder suffix = new StringBuilder();
            suffix.append(" (");
View Full Code Here

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

                HtmlList container = new HtmlList();

                for (UnitFileTag tag : tags) {
                    if (tag.isTagAccessibleToUser(person)) {
                        HtmlLink link = new HtmlLink();
                        link.setModuleRelative(isModuleRelative());
                        link.setContextRelative(isContextRelative());
                        link.setUrl(RenderUtils.getFormattedProperties(getLinkFormat(), tag));
                        if (getOnClick() != null) {
                            link.setOnClick(RenderUtils.getFormattedProperties(getOnClick(), tag));
                        }
                        if (getOnDblClick() != null) {
                            link.setOnDblClick(RenderUtils.getFormattedProperties(getOnDblClick(), tag));
                        }
                        HtmlText text = new HtmlText(tag.getName());
                        text.setClasses(getHtmlClass(maximum, tag, person));
                        link.setBody(text);
                        HtmlListItem item = container.createItem();

                        addExtraParameters(link, tag);

                        item.addChild(link);
View Full Code Here

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

                for (Grouping grouping : groupings) {
                    StudentGroup studentGroup = attends.getStudentGroupByGrouping(grouping);
                    if (studentGroup == null) {
                        row.createCell("N/A");
                    } else {
                        HtmlLink groupLink = new HtmlLink();
                        groupLink.setText(studentGroup.getGroupNumber().toString());
                        groupLink.setUrl(getGroupURL(studentGroup));
                        row.createCell().setBody(groupLink);
                    }
                }

                String email = attends.getRegistration().getStudent().getPerson().getEmail();
View Full Code Here

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

                    throw new RuntimeException(e);
                }

                HtmlText nameHtml = new HtmlText(name);

                HtmlLink emailHtml = new HtmlLink();
                emailHtml.setContextRelative(false);
                emailHtml.setUrl("mailto:" + email);

                if (!isCollapsed()) {
                    emailHtml.setText(email);
                    HtmlInlineContainer container = new HtmlInlineContainer();
                    container.addChild(nameHtml);
                    container.addChild(new HtmlText(" <", true));
                    container.addChild(emailHtml);
                    container.addChild(new HtmlText(">", true));
                    container.setIndented(false);

                    return container;
                } else {
                    emailHtml.setText(name);
                    return emailHtml;
                }

            }
View Full Code Here

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

                            container.addChild(new HtmlText(" " + getSeparator() + " "));
                        }

                        HtmlComponent component = null;
                        if (getLinkFormat() != null) {
                            HtmlLink link = new HtmlLink();
                            link.setModuleRelative(isModuleRelative());
                            link.setContextRelative(isContextRelative());
                            link.setUrl(RenderUtils.getFormattedProperties(getLinkFormat(), tag));
                            link.setBody(getText(tag));
                            component = link;
                        } else {
                            component = getText(tag);
                        }
                        container.addChild(component);
                        i++;
                    }
                }
                if (getShowAllUrl() != null) {
                    HtmlLink link = new HtmlLink();
                    link.setModuleRelative(isModuleRelative());
                    link.setContextRelative(isContextRelative());
                    link.setUrl(getShowAllUrl());
                    link.setBody(new HtmlText(RenderUtils.getResourceString("RENDERER_RESOURCES", "renderers.show.all")));
                    container.addChild(new HtmlText(" " + getSeparator() + " "));
                    container.addChild(link);
                }
                return container;
            }
View Full Code Here

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

                    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

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

            @Override
            public HtmlComponent createComponent(Object object, Class type) {
                if (object != null && object instanceof File) {
                    File file = (File) object;
                    HtmlBlockContainer container = new HtmlBlockContainer();
                    HtmlLink link = getLink(file);
                    container.addChild(link);
                    link.setIndented(false);
                    link.setText(getLinkText(file));
                    return container;
                }
                return new HtmlLink();
            }

            private HtmlLink getLink(File file) {
                HtmlLink link = new HtmlLinkWithPreprendedComment(GenericChecksumRewriter.NO_CHECKSUM_PREFIX);
//    if (file.hasLocalContent()) {
//        link.setContextRelative(true);
//    } else {
                link.setContextRelative(false);
//    }
                link.setModuleRelative(false);
                link.setUrl(file.getDownloadUrl());
                return link;
            }

            private String getLinkText(File file) {
                if (getKey() != null) {
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.