本文整理匯總了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()));
}
示例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);
}
示例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());
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例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()
);
}
示例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());
}
});
}
示例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);
}
示例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);
}