当前位置: 首页>>代码示例>>Java>>正文


Java ExternalLink类代码示例

本文整理汇总了Java中org.apache.wicket.markup.html.link.ExternalLink的典型用法代码示例。如果您正苦于以下问题:Java ExternalLink类的具体用法?Java ExternalLink怎么用?Java ExternalLink使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExternalLink类属于org.apache.wicket.markup.html.link包,在下文中一共展示了ExternalLink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FooterPanel

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
public FooterPanel(String id) {
	super(id);
	
	ExternalLink link = new ExternalLink("home", ReleaseInfo.getHome()) {
           protected void onComponentTag(ComponentTag componentTag) {
               super.onComponentTag(componentTag);
               componentTag.put("target", "_blank");
           }
       };
	link.add(new Label("company", ReleaseInfo.getCompany()));
	add(link);
	
	Label version = new Label("version", getVersion());
	version.add(new SimpleTooltipBehavior(getBuildDate()));
	add(version);		
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:17,代码来源:FooterPanel.java

示例2: createHeader

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
private void createHeader() {
    ExternalLink topLink = UrlUtil.getTopLink("top");
    add(topLink);
    Link<Void> reloadLink = new BookmarkablePageLink<Void>("refresh",
            LocationViewPage.class, LocationUtil.getParameters(current));
    add(reloadLink);

    Label categoryLabel = new Label("category", Model.of(LocationRenderer.getLocationType(current)));
    add(categoryLabel);

    String buildingCode = LocationRenderer.getBuildingCode(current);
    if (buildingCode != null) {
        buildingCode = "Building Code: " + buildingCode;
    }
    Label addressLabel = new Label("buildingCode", Model.of(buildingCode));
    add(addressLabel);

    String popName = LocationRenderer.getPopName(current);
    if (popName != null) {
        popName = "POP Name: " + popName;
    }
    Label popNameLabel = new Label("popName", Model.of(popName));
    add(popNameLabel);
}
 
开发者ID:openNaEF,项目名称:openNaEF,代码行数:25,代码来源:LocationViewPage.java

示例3: createLandingPageLink

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
private ExternalLink createLandingPageLink(String id) {
    final IModel<String> landingPageHrefModel
            // wrap in model that transforms handle links
            = new HandleLinkModel(
                    // get landing page from document
                    new SolrFieldStringModel(getModel(), FacetConstants.FIELD_LANDINGPAGE));
    // add landing page link
    final ExternalLink landingPageLink = new ExternalLink(id, landingPageHrefModel) {

        @Override
        protected void onConfigure() {
            super.onConfigure();
            setVisible(landingPageHrefModel.getObject() != null);
        }

    };
    return landingPageLink;
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:19,代码来源:RecordPage.java

示例4: createOriginalContextContainer

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
public MarkupContainer createOriginalContextContainer(final String id) {
    // get landing page from document
    final SolrFieldStringModel valueModel = new SolrFieldStringModel(getModel(), FacetConstants.FIELD_LANDINGPAGE);
    // wrap in model that transforms handle links
    final IModel<String> landingPageHrefModel = new HandleLinkModel(valueModel);

    //create container
    final MarkupContainer originalContext = new WebMarkupContainer(id) {

        @Override
        protected void onConfigure() {
            setVisible(landingPageHrefModel.getObject() != null);
        }
    };

    // add landing page link
    originalContext.add(new ExternalLink("landingPage", landingPageHrefModel));

    return originalContext;
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:21,代码来源:RecordLicenseInfoPanel.java

示例5: BookmarkLinkPanel

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
public BookmarkLinkPanel(String id, IModel<String> linkModel, IModel<String> pageTitleModel) {
    super(id);
    this.linkModel = linkModel;
    this.pageTitleModel = pageTitleModel;

    add(new ExternalLink("link", linkModel)
            .add(new Label("linkText", pageTitleModel)));
    add(new TextField("linkInput", linkModel));

    add(new WebMarkupContainer("bookmarkInstructions") {
        @Override
        protected void onConfigure() {
            setVisible(bookmarkMode);
        }

    });
    add(new WebMarkupContainer("copyInstructions") {
        @Override
        protected void onConfigure() {
            setVisible(copyMode);
        }

    });
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:25,代码来源:BookmarkLinkPanel.java

示例6: InvitationTemplate

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
private InvitationTemplate(Locale locale, String invitorName, String message, String link) {
	super(locale);

	add(new Label("titleLbl", getString("500", locale)));
	add(new Label("userLbl", getString("501", locale)));
	add(new Label("user", invitorName));
	add(new Label("messageLbl", getString("502", locale)));
	add(new Label("message", message).setEscapeModelStrings(false));

	add(new WebMarkupContainer("links")
		.add(new Label("comment_for_link1", getString("503", locale)))
		.add(new ExternalLink("invitation_link1", link).add(new Label("clickMe", getString("504", locale))))
		.add(new Label("comment_for_link2", getString("505", locale)))
		.add(new Label("invitation_link2", link))
		.setVisible(link != null)
		);
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:18,代码来源:InvitationTemplate.java

示例7: initMonitoringBtn

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
private void initMonitoringBtn() {
    monitoringUrlSpan = new WebMarkupContainer("monitoringUrlImg");

    if (getModelObject() != null) {
        monitoringUrl = getModelObject().getURLLinkFromType(LinkDto.LinkTypeEnum.METRICS_LINK);
    }
    
    monitoringUrlBtn = new ExternalLink("cell-monitoringUrl", (monitoringUrl != null) ? monitoringUrl.toString() : "") {

        private static final long serialVersionUID = 5630633258734623659L;

        @Override
        public boolean isVisible() {
            return monitoringUrl != null;
        }
    };

    monitoringUrlSpan.add(new AttributeAppender("class", new Model<String>((monitoringUrl != null) ? "monitoringUrl-enable" : "monitoringUrl-disable"), " "));
    monitoringUrlBtn.add(new AttributeModifier("id", new Model<String>("monitoringURL")));
    monitoringUrlBtn.add(new AttributeModifier("title", new Model<String>(getString("portal.environment.details.overalls.monitor.tooltip"))));
    monitoringUrlBtn.add(monitoringUrlSpan);
    addOrReplace(monitoringUrlBtn);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:24,代码来源:EnvironmentOverallsPanel.java

示例8: initComponents

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
public void initComponents() {
	
    ExternalLink contactUsLink = new ExternalLink ("contactUsLink", "mailto:" + contactUsBean.getMailTo());
    contactUsLink.add (new Label ("contactUsLabel", getStringResourceModel("portal.design.footer.contact.us")));
    add (contactUsLink);

    ExternalLink helpLink = new ExternalLink("helpLink", getStringResourceModel("portal.design.footer.help.link"));
    Label helpLinkLabel = new Label("helpLinkLabel", getStringResourceModel("portal.design.footer.help"));

    helpLink.add(helpLinkLabel);
    add(helpLink);
    boolean mock = Boolean.valueOf(WicketApplication.get().getInitParameter("mockMode"));
    String version =  "version " + getString("portal.build.version");

    String completeVersion = mock ? version + " (mock)" : version;
    Label versionLabel = new Label("version", completeVersion);

    versionLabel.add(new AttributeModifier("title",getString("portal.build.timestamp") + " " + getString("portal.build.user")));
    add(versionLabel);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:21,代码来源:Footer.java

示例9: initMonitoringUtlBtn

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
private void initMonitoringUtlBtn() {

        /* monitoring icon*/
        monitoringUrlSpan = new WebMarkupContainer("monitoringUrlImg");
        monitoringUrl = null;

        monitoringUrlBtn = new ExternalLink("cell-monitoringUrl", (monitoringUrl != null) ? monitoringUrl.toString() : "") {

            private static final long serialVersionUID = 5630633258734623659L;

            @Override
            public boolean isVisible() {
                // TODO : when monitoring will be integrated this condition will have to change
                return monitoringUrl != null;
            }
        };

        monitoringUrlSpan.add(new AttributeAppender("class", new Model<String>((monitoringUrl != null) ? "monitoringUrl-enable" : "monitoringUrl-disable"), " "));
        //monitoringUrlBtn.add(new AttributeAppender("target", new Model<String>("_blank"), " " ));
        monitoringUrlBtn.add(new AttributeModifier("id", new Model<String>("monitoringURL")));
        monitoringUrlBtn.add(monitoringUrlSpan);
        add(monitoringUrlBtn);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:25,代码来源:DesignerArchitectureMatrixCellButtonPanel.java

示例10: addRepoList

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
/**
 * Adds a list of virtual repositories, using a RepoAwareActionableItem for information
 *
 * @param item The selected item from the tree
 */
private void addRepoList(final RepoAwareActionableItem item) {
    RepositoryService repositoryService = ContextHelper.get().getRepositoryService();
    List<VirtualRepoDescriptor> reposToDisplay = repositoryService.getVirtualReposContainingRepo(item.getRepo());

    add(new ListView<VirtualRepoDescriptor>("items", reposToDisplay) {
        @Override
        protected void populateItem(ListItem<VirtualRepoDescriptor> virtualRepo) {
            VirtualRepoDescriptor virtualRepoDescriptor = virtualRepo.getModelObject();
            final String hrefPrefix = RequestUtils.getWicketServletContextUrl();
            String path = getRepoPath(item);
            String href = hrefPrefix + "/" + virtualRepoDescriptor.getKey() + "/" + path;
            if (!href.endsWith("/")) {
                href += "/";
            }
            AbstractLink link = new ExternalLink("link", href, virtualRepoDescriptor.getKey());
            link.add(new CssClass("repository-virtual"));
            virtualRepo.add(link);
        }
    });
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:26,代码来源:VirtualRepoListPanel.java

示例11: linkToJSON

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
/**
 * @return a link to JSON response in order to test the query
 */
private ExternalLink linkToJSON() {
  ExternalLink link = new ExternalLink("linkCubesQuery", query) {
    private static final long serialVersionUID = 1L;

    @Override
    protected void onComponentTag(ComponentTag tag) {
      super.onComponentTag(tag);
      tag.put("target", "_blank");
    }
  };

  link.add(new Label("query", query));

  return link;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:19,代码来源:AnalysisDrilldown.java

示例12: populateItem

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
@Override
public void populateItem(Item<LdapUser> item, Check<LdapUser> check) {
	LdapUser user = item.getModelObject();
	item.add(new Label("username", new PropertyModel(user, "userName")));
	item.add(new ExternalLink("mail", "mailto:" + user.getMail()).add(new Label("mailText", new PropertyModel(user, "mail"))));
	item.add(new Label("firstName", new PropertyModel(user, "firstName")));
	item.add(new Label("lastName", new PropertyModel(user, "lastName")));
	item.add(new Image("photo", user.hasProfilePicture() ? user.getProfilePictureImage() : anonymousPicture));
	if (isSelectionEnabled()) {
		if (userService.ldapBasedUserExists(user)) {
			check.setVisible(false);
			item.add(new AttributeAppender("class", Model.of("warning")));
			item.add(new AttributeAppender("title", new StringResourceModel("table.users.warning.exists", this, null)));
		} else {
			item.add(new AttributeAppender("class", Model.of("success")));
		}
	}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:19,代码来源:LdapUserListPanel.java

示例13: linkCubesQuery

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
/**
 * @return
 */
private ExternalLink linkCubesQuery(
		final CubesMetricMeasurement cubesMetricMeasurement) {

	ExternalLink link = new  ExternalLink("linkCubesQuery", cubesMetricMeasurement.getSelf()){
		private static final long serialVersionUID = 1L;

		@Override
		protected void onComponentTag(ComponentTag tag) {
			super.onComponentTag(tag);
			tag.put("target","_blank");
		}
	};
	link.add(new Label("cubesMetric", new PropertyModel<String>(
			cubesMetricMeasurement, "cubesMetric")));

	// tooltip config
	TooltipConfig confConfig = new TooltipConfig()
			.withPlacement(TooltipConfig.Placement.top);
	link.add(new TooltipBehavior(new PropertyModel<String>(cubesMetricMeasurement,
			"self"), confConfig));

	return link;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:27,代码来源:CubeAnalysisDataManagementPage.java

示例14: navigationLink

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
private WebMarkupContainer navigationLink(NavigationEntry navigationEntry) {
    String navigationEntryPageClassName = navigationEntry.getPageClass().getName();
    if (((ShopSession) ShopSession.get()).isMicroServiceMode()) {
        switch (navigationEntryPageClassName) {
            case "io.github.zutherb.appstash.shop.ui.page.catalog.ProductCatalogPage":
                return new ExternalLink("link", new ProductCatalogPageStringResourceModel(new StringResourceModel(navigationEntryPageClassName, this, null), Model.of(navigationEntry)));
            default:
                return new ExternalLink("link", new StringResourceModel(navigationEntryPageClassName, this, null));
        }
    }
    if (((ShopSession) ShopSession.get()).isDockerMode()) {
        String resourceKey = "docker." + navigationEntryPageClassName;
        switch (navigationEntryPageClassName) {
            case "io.github.zutherb.appstash.shop.ui.page.catalog.ProductCatalogPage":
                return new ExternalLink("link", new ProductCatalogPageStringResourceModel(new StringResourceModel(resourceKey, this, null), Model.of(navigationEntry)));
            default:
                return new ExternalLink("link", new StringResourceModel(resourceKey, this, null));
        }
    }
    return new BookmarkablePageLink<>("link",
            navigationEntry.getPageClass(), navigationEntry.getPageParameters());
}
 
开发者ID:zutherb,项目名称:AppStash,代码行数:23,代码来源:NavigationPanel.java

示例15: onInitialize

import org.apache.wicket.markup.html.link.ExternalLink; //导入依赖的package包/类
@Override
protected void onInitialize() {
    super.onInitialize();
    setVisible(product != null);
    
    BookmarkablePageLink<ChooseProductPage> productLink = new BookmarkablePageLink<>("chooseProductLink", ChooseProductPage.class);
    productLink.setBody(Model.of(product == null ? "none" : product.getObject().getProductName()));
    add(productLink);
    
    add(new ListView<GVersion>("versions", facade.getVersions(product.getObject())) {
        @Override
        protected void populateItem(ListItem<GVersion> item) {
            item.add(new ExternalLink("link", "#", item.getModelObject().getName()));
        }
    });
}
 
开发者ID:MichaelRehberg,项目名称:gluezilla,代码行数:17,代码来源:VersionSidebar.java


注:本文中的org.apache.wicket.markup.html.link.ExternalLink类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。