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


Java BookmarkablePageLink类代码示例

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


BookmarkablePageLink类属于org.apache.wicket.markup.html.link包,在下文中一共展示了BookmarkablePageLink类的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: createHeader

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的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: populateNode

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
private void populateNode() throws ExternalServiceException, IOException, RemoteException {
    ListView<NodeDto> list = new ListView<NodeDto>("nodeList", this.model) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(ListItem<NodeDto> item) {
            NodeDto node = item.getModelObject();
            BookmarkablePageLink<Void> link = NodePageUtil.createNodeLink("nodeLink", node);
            item.add(link);
        }
    };
    add(list);
    WebMarkupContainer container = new WebMarkupContainer("nodeBlock");
    add(container);
    container.setVisible(this.model.isVisible());
}
 
开发者ID:openNaEF,项目名称:openNaEF,代码行数:17,代码来源:LocationViewPage.java

示例4: 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

示例5: loadNavbar

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
/**
 * generates the navbar and mark the active page
 *
 * @param activePage page to be marked active (null for no active page)
 */
private void loadNavbar(final PageType activePage) {
    // add an entry for each page type
    add(new ListView<PageType>("navbar_left_elements", Arrays.asList(PageType.values())) {
        @Override
        protected void populateItem(final ListItem<PageType> item) {
            final PageType type = item.getModelObject();
            // create a link for the page type
            BookmarkablePageLink<String> link = new BookmarkablePageLink<>("navbar_left_element_link", type.getPageClass());
            link.add(new Label("navbar_left_element_text", type.getLinkText()));
            // if the type is same as active page, mark it as active
            if (type.equals(activePage)) link.add(new AttributeAppender("class", "active", " "));
            item.add(link);
        }
    });

    // create the summoner search region drop down menu
    // get all valid entries
    List<String> endpoints = Arrays.asList(RiotEndpoint.PLAYABLE_ENDPOINTS)
            .stream().map(RiotEndpoint::name).collect(Collectors.toList());
    // add the options to the drop down menu
    DropDownChoice<String> dropDownChoice = new DropDownChoice<>("navbar_form_regions_select",
            new PropertyModel<>(this, "selectedRegion"), endpoints, new StringChoiceRenderer());
    dropDownChoice.add(new AttributeModifier("name", "region"));
    add(dropDownChoice);
}
 
开发者ID:LogicalOverflow,项目名称:MasterStats,代码行数:31,代码来源:BasePage.java

示例6: doInitialize

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    RoleProvider provider = new RoleProvider();
    provider.selectField("roleId", String.class);

    FilterForm<Map<String, String>> filterForm = new FilterForm<>("filter-form", provider);
    layout.add(filterForm);

    List<IColumn<Map<String, Object>, String>> columns = new ArrayList<>();
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("name"), "name", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("description"), "description", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.Boolean, Model.of("system"), "system", this::modelValue));
    columns.add(new ActionFilterColumn(Model.of("action"), this::actions, this::clickable, this::itemCss, this::itemClick));

    DataTable<Map<String, Object>, String> dataTable = new DefaultDataTable<>("table", columns, provider, 20);
    dataTable.addTopToolbar(new FilterToolbar(dataTable, filterForm));
    filterForm.add(dataTable);

    BookmarkablePageLink<Void> refreshLink = new BookmarkablePageLink<>("refreshLink", RoleBrowsePage.class);
    layout.add(refreshLink);

    BookmarkablePageLink<Void> createLink = new BookmarkablePageLink<>("createLink", RoleCreatePage.class);
    layout.add(createLink);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:27,代码来源:RoleBrowsePage.java

示例7: doInitialize

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    SectionProvider provider = new SectionProvider();
    provider.selectField("sectionId", String.class);

    FilterForm<Map<String, String>> filterForm = new FilterForm<>("filter-form", provider);
    layout.add(filterForm);

    List<IColumn<Map<String, Object>, String>> columns = new ArrayList<>();
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("title"), "title", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.Boolean, Model.of("system"), "system", this::modelValue));
    columns.add(new ActionFilterColumn(Model.of("action"), this::actions, this::clickable, this::itemCss, this::itemClick));

    DataTable<Map<String, Object>, String> dataTable = new DefaultDataTable<>("table", columns, provider, 20);
    dataTable.addTopToolbar(new FilterToolbar(dataTable, filterForm));
    filterForm.add(dataTable);

    BookmarkablePageLink<Void> refreshLink = new BookmarkablePageLink<>("refreshLink", SectionBrowsePage.class);
    layout.add(refreshLink);

    BookmarkablePageLink<Void> createLink = new BookmarkablePageLink<>("createLink", SectionCreatePage.class);
    layout.add(createLink);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:26,代码来源:SectionBrowsePage.java

示例8: doInitialize

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    FileProvider provider = new FileProvider();

    FilterForm<Map<String, String>> filterForm = new FilterForm<>("filter-form", provider);
    layout.add(filterForm);

    List<IColumn<Map<String, Object>, String>> columns = new ArrayList<>();
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("fileId"), "fileId", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("name"), "name", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.Integer, Model.of("length"), "length", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("mime"), "mime", this::modelValue));
    columns.add(new ActionFilterColumn(Model.of("action"), this::actions, this::clickable, this::itemCss, this::itemClick));

    this.dataTable = new DefaultDataTable<>("table", columns, provider, 17);
    this.dataTable.addTopToolbar(new FilterToolbar(this.dataTable, filterForm));
    filterForm.add(this.dataTable);

    BookmarkablePageLink<Void> refreshLink = new BookmarkablePageLink<>("refreshLink", FileBrowsePage.class);
    layout.add(refreshLink);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:24,代码来源:FileBrowsePage.java

示例9: doInitialize

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    this.form = new Form<>("form");
    layout.add(this.form);

    this.nameField = new TextField<>("nameField", new PropertyModel<>(this, "name"));
    this.nameField.add(new CollectionNameValidator());
    this.nameField.setRequired(true);
    this.form.add(this.nameField);

    this.nameFeedback = new TextFeedbackPanel("nameFeedback", this.nameField);
    this.form.add(this.nameFeedback);

    this.closeButton = new BookmarkablePageLink<>("closeButton", CollectionBrowsePage.class);
    this.form.add(this.closeButton);

    this.saveButton = new Button("saveButton");
    this.saveButton.setOnSubmit(this::saveButtonOnSubmit);
    this.form.add(this.saveButton);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:23,代码来源:CollectionCreatePage.java

示例10: ErrorPage

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
public ErrorPage(PageParameters parameters) {
    super(parameters);
    this.errorType = getErrorType(parameters.get(PAGE_PARAMETER_RESPONSE_CODE).toString());

    final PageParameters queryParams = new PageParameters(parameters).remove(PAGE_PARAMETER_RESPONSE_CODE);
    final boolean hasQuery = !queryParams.get(VloWebAppParameters.QUERY).isEmpty() || !queryParams.get(VloWebAppParameters.FILTER_QUERY).isEmpty();
    add(new BookmarkablePageLink("searchPage", FacetedSearchPage.class, queryParams)
            .add(new Label("label", hasQuery ? "Return to query" : "Go to the search page"))
    );

    final IModel<String> errorDescriptionModel = new LoadableDetachableModel<String>() {
        @Override
        protected String load() {
            return getDescriptionForError(errorType);
        }
    };
    add(new Label("description", errorDescriptionModel) {
        @Override
        protected void onConfigure() {
            setVisible(errorDescriptionModel.getObject() != null);
        }

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

示例11: addMenuElement

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
protected void addMenuElement(MarkupContainer menuContainer,
		Class<? extends Page> selectedPageClass,
		String name,
		Class<? extends Page> pageClass,
		PageParameters parameters,
		boolean isVisible) {
	BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(name + "MenuLink", pageClass, parameters);
	link.setVisible(isVisible && isPageAccessible(pageClass));
	
	MarkupContainer container = new WebMarkupContainer(name + "MenuLinkContainer");
	if (pageClass.equals(selectedPageClass)) {
		container.add(new ClassAttributeAppender("active"));
	}
	container.add(link);
	
	menuContainer.add(container);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:18,代码来源:AbstractWebPageTemplate.java

示例12: LinkBreadCrumbElementPanel

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
public LinkBreadCrumbElementPanel(String id, BreadCrumbElement breadCrumbElement, BreadCrumbMarkupTagRenderingBehavior renderingBehavior) {
	super(id, breadCrumbElement.getLabelModel());
	
	Link<Void> breadCrumbLink = new BookmarkablePageLink<Void>("breadCrumbElementLink", breadCrumbElement.getPageClass(),
			breadCrumbElement.getPageParameters()) {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onConfigure() {
			super.onConfigure();
			
			setVisible(Session.get().getAuthorizationStrategy().isInstantiationAuthorized(getPageClass()));
		}
	};
	breadCrumbLink.setBody(getModel());
	breadCrumbLink.add(renderingBehavior);
	add(breadCrumbLink);
	
	add(
			Condition.componentVisible(breadCrumbLink).thenShowInternal()
	);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:23,代码来源:LinkBreadCrumbElementPanel.java

示例13: 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

示例14: onInitialize

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
@Override
    protected void onInitialize() {
        super.onInitialize();
        //add(new GrowlBehavior());
        add(new HtmlTag("html", Locale.US));
        add(new Label("title", getTitleModel()));
        add(new MetaTag("metaDescription", new Model<>("description"), getMetaDescriptionModel()));
        add(new BookmarkablePageLink<>("skillManagementLink", SkillManagementPage.class, new PageParameters().set("skillId", "")));
//        add(new BookmarkablePageLink<>("roadsLink", RoadListPage.class,
//                new PageParameters().set(SeoBookmarkableMapper.LOCALE_PREF_ID_PARAMETER, localePrefId)));
//        add(new BookmarkablePageLink<>("camerasLink", CameraListPage.class,
//                new PageParameters().set(SeoBookmarkableMapper.LOCALE_PREF_ID_PARAMETER, localePrefId)));
//
//        add(new BookmarkablePageLink<>("tweetListLink", TweetListPage.class,
//                new PageParameters().set(SeoBookmarkableMapper.LOCALE_PREF_ID_PARAMETER, localePrefId)));
//        add(new BookmarkablePageLink<>("tweetMapLink", TweetMapPage.class,
//                new PageParameters().set(SeoBookmarkableMapper.LOCALE_PREF_ID_PARAMETER, localePrefId)));
        notificationPanel = new NotificationPanel("notificationPanel");
        notificationPanel.setOutputMarkupId(true);
        add(notificationPanel);
    }
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:22,代码来源:PubLayout.java

示例15: createDocumentList

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //导入依赖的package包/类
private void createDocumentList(String id, List<DocumentListData> docList) {
    ListView listview = new ListView(id, docList) {
        @Override
        protected void populateItem(ListItem item) {
            DocumentListData doc = (DocumentListData) item.getModelObject();
            
            PageParameters pp = new PageParameters();
            pp.add("id", doc.getId());
            
            BookmarkablePageLink<Void> docLink = new BookmarkablePageLink("docLink", DocumentTabs.class, pp);
            item.add(docLink.add(new Label("id", doc.getId())));
            item.add(new Label("title", doc.getTitle()));
        }
    };
    add(listview);
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:17,代码来源:User.java


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