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


Java BookmarkablePageLink.add方法代码示例

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


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

示例1: DocumentationIndexPage

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
public DocumentationIndexPage() {
	Harvester harvester = new Harvester();
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
	ListView listview = new ListView("listview", harvester.getWorkspaces()) {
	    /**
		 * 
		 */
		private static final long serialVersionUID = 2974513833506276491L;

		protected void populateItem(ListItem item) {
	    	WorkspaceDoc wi = (WorkspaceDoc) item.getModelObject();
			BookmarkablePageLink link = new BookmarkablePageLink("link", WorkspacePage.class);
			link.setParameter("workspaceName", wi.getName());
			link.add(new Label("workspaceName", wi.getName()));
	        item.add(link);
	    }
	};
	add(listview);

	ExtensionInfo info = new ExtensionInfo();
	add(new Label("documentorVersion", info.getVersion()));
	add(new Label("documentorGitVersion", info.getGitVersion()));
	add(new Label("readme", info.getReadme()));
}
 
开发者ID:geops,项目名称:geoserver-documentor,代码行数:26,代码来源:DocumentationIndexPage.java

示例2: createNodeLink

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
public static Link<Void> createNodeLink(final String id, final PortDto port) {
    final PageParameters param;
    final String nodeName;
    if (port != null) {
        param = NodeUtil.getParameters(port.getNode());
        nodeName = port.getNode().getName();
    } else {
        param = null;
        nodeName = null;
    }
    BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(id, SimpleNodeDetailPage.class, param);
    link.setEnabled(port != null);
    Label label = new Label("nodeName", nodeName);
    link.add(label);
    return link;
}
 
开发者ID:openNaEF,项目名称:openNaEF,代码行数:17,代码来源:NodePageUtil.java

示例3: LinkPanel

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
public LinkPanel(final String componentId,
				 final Class<? extends Page> pageClass, final PageParameters params,
				 final IModel<String> labelModel, @Nullable TagType tagType) {
	super(componentId);
	final BookmarkablePageLink<Page> link = new BookmarkablePageLink<>("link", pageClass, params);
	if (tagType != null) {
		link.add(new TagLabel("label", labelModel, tagType));
	} else {
		link.add(new Label("label", labelModel));
	}
	add(link);
	add(new WebMarkupContainer("lock") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onConfigure() {
			super.onConfigure();
			setVisible(!isEnabledInHierarchy());
		}
	});
}
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:22,代码来源:LinkPanel.java

示例4: createMainMenu

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
private void createMainMenu(final Builder builder) {
    BookmarkablePageLink<Void> homePageLink = new BookmarkablePageLink<>("homePageLink", builder.homePage);
    homePageLink.add(new Label("label", builder.applicationName));
    add(homePageLink);
    
    RepeatingView menuItems = new RepeatingView("menuItems");
    
    builder.linksMap.keySet().stream().forEach((item) -> {
        boolean shouldBeActive = item.equals(builder.activeMenuItem);

        List<BookmarkablePageLink<?>> pageLinks = builder.linksMap.get(item);

        if (pageLinks.size() == 1) {
            BookmarkablePageLink<?> pageLink = pageLinks.get(0);
            MenuLinkItem menuLinkItem = new MenuLinkItem(menuItems.newChildId(), pageLink, shouldBeActive);
            menuItems.add(menuLinkItem);
        } else {
            menuItems.add(new MenuDropdownItem(menuItems.newChildId(), item, pageLinks,
                    shouldBeActive));
        }
    });
    
    add(menuItems);
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:25,代码来源:Menu.java

示例5: populateDataViewItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QMQualityIndicator> item) {
    final QMQualityIndicator entity = item.getModelObject();
    BookmarkablePageLink<QMQualityIndicatorEditPage> link = new BookmarkablePageLink<>("link",
            QMQualityIndicatorEditPage.class, QMQualityIndicatorEditPage.forQualityIndicator(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<QModelViewPage> QMlink = new BookmarkablePageLink<>("qmodel",
    		QModelViewPage.class, QModelViewPage.forQModel(entity.getQModel()));
    QMlink.add(new Label("qmKey", Model.of(entity.getQModel().getNodeKey())));
    item.add(QMlink);
    
    item.add(new Label("value", Model.of(entity.getTargetValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:17,代码来源:QMQualityIndicatorSearchResultsPanel.java

示例6: MenuItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
public MenuItem(String id, IModel itemText, Class itemPageClass, PageParameters pageParameters, boolean first) {
	super(id);

	// link version
	menuItemLinkHolder = new WebMarkupContainer("menuItemLinkHolder");
	menuItemLink = new BookmarkablePageLink("menuItemLink", itemPageClass, pageParameters);
	menuLinkText = new Label("menuLinkText", itemText);
	menuLinkText.setRenderBodyOnly(true);
	menuItemLink.add(menuLinkText);
	menuItemLinkHolder.add(menuItemLink);
	add(menuItemLinkHolder);

	// span version
	menuItemLabel = new Label("menuItemLabel", itemText);
	menuItemLabel.setRenderBodyOnly(true);
	add(menuItemLabel);
	
	if(first) {
		add(new AttributeModifier("class", new Model("firstToolBarItem")));
	}
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:22,代码来源:MenuItem.java

示例7: populateDataViewItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QualityIndicator> item) {
    final QualityIndicator entity = item.getModelObject();
    BookmarkablePageLink<QualityIndicatorEditPage> link = new BookmarkablePageLink<>("link",
            QualityIndicatorEditPage.class, QualityIndicatorEditPage.forQualityIndicator(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<ProjectViewPage> projectLink = new BookmarkablePageLink<>("project",
            ProjectViewPage.class, ProjectViewPage.forProject(entity.getProject()));
    projectLink.add(new Label("projectKey", Model.of(entity.getProject().getNodeKey())));
    item.add(projectLink);
    
    item.add(new Label("value", Model.of(entity.getValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:17,代码来源:QualityIndicatorSearchResultsPanel.java

示例8: populateDataViewItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QMMetric> item) {
    final QMMetric entity = item.getModelObject();
    BookmarkablePageLink<QMMetricEditPage> link = new BookmarkablePageLink<>("link",
            QMMetricEditPage.class, QMMetricEditPage.forMetric(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<QModelViewPage> QMlink = new BookmarkablePageLink<>("qmodel",
    		QModelViewPage.class, QModelViewPage.forQModel(entity.getQModel()));
    QMlink.add(new Label("qmKey", Model.of(entity.getQModel().getNodeKey())));
    item.add(QMlink);
    
    
    item.add(new Label("value", Model.of(entity.getTargetValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:18,代码来源:QMMetricSearchResultsPanel.java

示例9: getTeamListing

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
private DataView<TeamMembership> getTeamListing() {
	return new DataView<TeamMembership>("teams", provider = new TeamProvider(user)) {
		@Override
		protected void populateItem(Item<TeamMembership> item) {
			final TeamMembership team = item.getModelObject();
			Check<TeamMembership> check = newDeleteCheck(item);
			List<Role> roles = new ArrayList<>(Arrays.asList(Role.teamAssignableRoles()));
			item.add(check);
			DropDownChoice<Role> roleSelector = new DropDownChoice<>("td.role",
					new PropertyModel<Role>(team, "role"), roles
			);
			roleSelector.setNullValid(false);
			item.add(roleSelector);
			BookmarkablePageLink<TeamEditPage> editTeamLink = new BookmarkablePageLink<>("link.edit.team", TeamEditPage.class, new PageParameters().add("id", team.getTeam().getId()));
			editTeamLink.add(new Label("td.teamname", new PropertyModel<>(team.getTeam(), "name")));
			item.add(editTeamLink);
			item.setOutputMarkupId(true);
		}
	};
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:21,代码来源:UserEditPage.java

示例10: setLinkToNodePage

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
/**
 * @param node
 * @return Returns a Link to the page element according to the type of the node
 */
   private BookmarkablePageLink<?> setLinkToNodePage(final TreeNode node) {
	BookmarkablePageLink<?> link = null;
	
	if (node instanceof Project) {
		link = new BookmarkablePageLink<ProjectViewPage>("link", ProjectViewPage.class, 
				BaseTreePage.forProject((Project) node));
	} else if (node instanceof QualityObjective) {
		link = new BookmarkablePageLink<ProjectViewPage>("link", QualityObjectiveViewPage.class,
				BaseTreePage.forQualityObjective((QualityObjective) node));
	} else if (node instanceof QualityIndicator) {
		link = new BookmarkablePageLink<ProjectViewPage>("link",QualityIndicatorViewPage.class,
				BaseTreePage.forQualityIndicator((QualityIndicator) node));
	} else if (node instanceof Metric) {
		link = new BookmarkablePageLink<ProjectViewPage>("link",MetricViewPage.class, BaseTreePage.forMetric((Metric) node));
	}
	
	link.add(new Label("name", new PropertyModel<String>(node, "name")));
	
	return link;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:25,代码来源:VisualProjectPanel.java

示例11: populateDataViewItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QMQualityObjective> item) {
    final QMQualityObjective entity = item.getModelObject();
   BookmarkablePageLink<QMQualityObjectiveEditPage> link = new BookmarkablePageLink<>("link",
            QMQualityObjectiveEditPage.class, QMQualityObjectiveEditPage.forQualityObjective(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<QModelViewPage> QMlink = new BookmarkablePageLink<>("qmodel",
    		QModelViewPage.class, QModelViewPage.forQModel(entity.getQModel()));
    QMlink.add(new Label("qmKey", Model.of(entity.getQModel().getNodeKey())));
    item.add(QMlink);
    
    item.add(new Label("value", Model.of(entity.getTargetValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:17,代码来源:QMQualityObjectiveSearchResultsPanel.java

示例12: populateDataViewItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<Metric> item) {
    final Metric entity = item.getModelObject();
    BookmarkablePageLink<MetricEditPage> link = new BookmarkablePageLink<>("link",
            MetricEditPage.class, MetricEditPage.forMetric(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<ProjectViewPage> projectLink = new BookmarkablePageLink<>("project",
            ProjectViewPage.class, ProjectViewPage.forProject(entity.getProject()));
    projectLink.add(new Label("projectKey", Model.of(entity.getProject().getNodeKey())));
    item.add(projectLink);
    
    item.add(new Label("source", Model.of(entity.getMetricSource())));
    item.add(new Label("value", Model.of(entity.getValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:18,代码来源:MetricSearchResultsPanel.java

示例13: populateDataViewItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
@Override
protected void populateDataViewItem(Item<QualityObjective> item) {
    final QualityObjective entity = item.getModelObject();
   BookmarkablePageLink<QualityObjectiveEditPage> link = new BookmarkablePageLink<>("link",
            QualityObjectiveEditPage.class, QualityObjectiveEditPage.forQualityObjective(entity));
    link.add(new Label("name", Model.of(entity.getName()
            + " (" + entity.getNodeKey() + ")")).setRenderBodyOnly(true));
    item.add(link);
    
    BookmarkablePageLink<ProjectViewPage> projectLink = new BookmarkablePageLink<>("project",
            ProjectViewPage.class, ProjectViewPage.forProject(entity.getProject()));
    projectLink.add(new Label("projectKey", Model.of(entity.getProject().getNodeKey())));
    item.add(projectLink);
    
    item.add(new Label("purpose", Model.of(entity.getQualityPurpose())));
    item.add(new Label("value", Model.of(entity.getValue())));
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:18,代码来源:QualityObjectiveSearchResultsPanel.java

示例14: addAboutLink

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
private void addAboutLink() {
    final BookmarkablePageLink<Void> aboutLink = new BookmarkablePageLink<>(ID_ABOUT_LINK, AboutPage.class);
    add(aboutLink);

    final Label aboutLabel = new Label(ID_ABOUT_MESSAGE, new ResourceModel("aboutLabel"));
    aboutLink.add(aboutLabel);
    addDevModeWarning(aboutLink);
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:9,代码来源:CustomFooterPanel.java

示例15: createSimpleNodeLink

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入方法依赖的package包/类
public static BookmarkablePageLink<Void> createSimpleNodeLink(final String id, final NodeDto node, final String captionId) {
    BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(id, SimpleNodeDetailPage.class, NodeUtil.getParameters(node));
    link.setEnabled(node != null);
    String nodeName = (node == null ? "" : node.getName());
    if (captionId != null) {
        Label label = new Label(captionId, nodeName);
        link.add(label);
    }
    return link;
}
 
开发者ID:openNaEF,项目名称:openNaEF,代码行数:11,代码来源:NodePageUtil.java


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