Package pt.ist.fenixWebFramework.renderers.components

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


                    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

                            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

                    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

            @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

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

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.