Java Code Examples for org.apache.wicket.markup.html.link.BookmarkablePageLink

The following examples show how to use org.apache.wicket.markup.html.link.BookmarkablePageLink. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: onedev   Source File: HistoryAwarePagingNavigator.java    License: MIT License 6 votes vote down vote up
@Override
protected AbstractLink newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) {
	AbstractLink link;
	if (pagingHistorySupport != null) {
		int pageNumber = (int) pageable.getCurrentPage() + increment;
		link = new BookmarkablePageLink<Void>(id, getPage().getClass(),
				pagingHistorySupport.newPageParameters(pageNumber)) {

			@Override
			protected void onConfigure() {
				super.onConfigure();
				setEnabled(pageNumber >= 0 && pageNumber < getPageable().getPageCount());
			}
			
		};
		link.add(new DisabledAttributeLinkBehavior());
	} else {
		link = new PagingNavigationIncrementLink<Void>(id, pageable, increment);
	}
	return link;
}
 
Example 2
Source Project: onedev   Source File: HistoryAwarePagingNavigator.java    License: MIT License 6 votes vote down vote up
@Override
protected AbstractLink newPagingNavigationLink(String id, IPageable pageable, int pageNumber) {
	AbstractLink link;
	int absolutePageNumber;
	if (pageNumber == -1)
		absolutePageNumber = (int) (getPageable().getPageCount()-1);
	else
		absolutePageNumber = pageNumber;
	if (pagingHistorySupport != null) {
		link = new BookmarkablePageLink<Void>(id, getPage().getClass(),
				pagingHistorySupport.newPageParameters(absolutePageNumber)) {
			
			@Override
			protected void onConfigure() {
				super.onConfigure();
				setEnabled(absolutePageNumber != pageable.getCurrentPage());
			}
			
		};
		link.add(new DisabledAttributeLinkBehavior());
	} else {
		link = new PagingNavigationLink<Void>(id, pageable, pageNumber);
	}
	return link;
}
 
Example 3
Source Project: the-app   Source File: NavigationPanel.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example 4
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public Link newAddToCartLink(final String linkId,
                             final String supplier,
                             final String skuCode,
                             final String quantity,
                             final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_ADDTOCART, skuCode);
    params.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    if (quantity != null) { // null quantity will pick min from product
        params.set(ShoppingCartCommand.CMD_P_QTY, quantity);
    }
    return new BookmarkablePageLink(linkId, getHomePage(), params);
}
 
Example 5
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public Link newAddToCartLink(final String linkId,
                             final String supplier,
                             final String skuCode,
                             final String quantity,
                             final String wishlistId,
                             final Class<Page> target,
                             final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_ADDTOCART, skuCode);
    params.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    params.set(ShoppingCartCommand.CMD_REMOVEFROMWISHLIST, skuCode);
    params.set(ShoppingCartCommand.CMD_REMOVEFROMWISHLIST_P_ID, wishlistId);
    if (quantity != null) { // null quantity will pick min from product
        params.set(ShoppingCartCommand.CMD_P_QTY, quantity);
    }
    return new BookmarkablePageLink(linkId, target, params);
}
 
Example 6
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public Link newRemoveFromWishListLink(final String linkId,
                                      final String supplier,
                                      final String skuCode,
                                      final Long itemId,
                                      final Class<Page> target,
                                      final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_REMOVEFROMWISHLIST, skuCode);
    params.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    params.set(ShoppingCartCommand.CMD_REMOVEFROMWISHLIST_P_ID, itemId);
    return new BookmarkablePageLink(linkId, target, params);
}
 
Example 7
Source Project: webanno   Source File: LogoutPanel.java    License: Apache License 2.0 6 votes vote down vote up
public LogoutPanel(String id)
{
    super(id);
    
    add(new StatelessLink<Void>("logout")
    {
        private static final long serialVersionUID = -4031945370627254798L;

        @Override
        public void onClick()
        {
            AuthenticatedWebSession.get().signOut();
            getSession().invalidate();
            setResponsePage(getApplication().getHomePage());
        }
    });
    
    String username = Optional.ofNullable(userRepository.getCurrentUser())
            .map(User::getUsername).orElse("");
    BookmarkablePageLink<Void> profileLink = new BookmarkablePageLink<>("profile",
            ManageUsersPage.class, new PageParameters().add(
                    ManageUsersPage.PARAM_USER, username));
    profileLink.add(enabledWhen(SecurityUtil::isProfileSelfServiceAllowed));
    profileLink.add(visibleWhen(() -> isNotBlank(username)));
    profileLink.add(new Label("username", username));
    add(profileLink);
    
    WebMarkupContainer logoutTimer = new WebMarkupContainer("logoutTimer");
    logoutTimer.add(visibleWhen(() -> getAutoLogoutTime() > 0));
    add(logoutTimer);
}
 
Example 8
Source Project: ontopia   Source File: VizigatorLinkFunctionBoxPanel.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Component getLink(String id) {
  PageParameters pageParameters = new PageParameters();
  pageParameters.put("topicMapId", getTopicMapId());
  pageParameters.put("topicId", getTopicId());
  
  return new BookmarkablePageLink<Page>(id, VizigatorPage.class, pageParameters) {
    @Override
    protected void onComponentTag(ComponentTag tag) {
      tag.setName("a");
      //tag.put("target", "_blank");
      super.onComponentTag(tag);
    }
    @Override
    protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
      replaceComponentTagBody(markupStream, openTag, new ResourceModel("vizigator.text2").getObject().toString());
    }
  };
}
 
Example 9
Source Project: AppStash   Source File: NavigationPanel.java    License: Apache License 2.0 6 votes vote down vote up
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());
}
 
Example 10
Source Project: Orienteer   Source File: SchemaPageHeader.java    License: Apache License 2.0 6 votes vote down vote up
public SchemaPageHeader(String id, IModel<OClass> oClassModel) {
	super(id, oClassModel);
	add(new BookmarkablePageLink<Object>("schema", SchemaPage.class)
					.setBody(new ResourceModel("menu.list.schema")));
	
	add(new ListView<OClass>("classes", classPathModel) {

		@Override
		protected void populateItem(ListItem<OClass> item) {
			item.add(new OClassPageLink("link", item.getModel()).setClassNameAsBody(false));
		}
	});
	childRepeatingView = new RepeatingView("child");
	add(childRepeatingView);
	add(UpdateOnActionPerformedEventBehavior.INSTANCE_ALWAYS_FOR_CHANGING);
	add(new DefaultPageHeaderMenu("menu"));
}
 
Example 11
Source Project: artifact-listener   Source File: FooterPanel.java    License: Apache License 2.0 6 votes vote down vote up
public FooterPanel(String id) {
	super(id);
	add(new Label("smile", new StringResourceModel("footer.links.smile", Model.of(ExternalLinks.get(configurer)))).setEscapeModelStrings(false));
	add(new BookmarkablePageLink<Void>("aboutLink", AboutPage.class));
	WebMarkupContainer gitHubProjectContainer = new WebMarkupContainer("gitHubProjectContainer") {
		private static final long serialVersionUID = 1L;
		
		@Override
		protected void onConfigure() {
			super.onConfigure();
			setVisible(StringUtils.hasText(ExternalLinks.get(configurer).getGitHubProject()));
		}
	};
	add(gitHubProjectContainer);
	gitHubProjectContainer.add(new Label("gitHubProject", new StringResourceModel("footer.links.gitHubProject", Model.of(ExternalLinks.get(configurer)))).setEscapeModelStrings(false));
	
	add(new Label("twitter", new StringResourceModel("footer.links.twitter", Model.of(ExternalLinks.get(configurer)))).setEscapeModelStrings(false));
	
	add(new ObfuscatedEmailLink("contactUsLink", Model.of(configurer.getLinkContactUs())));

	add(new ExternalLink("smileLink", configurer.getLinkSmile()));
}
 
Example 12
Source Project: inception   Source File: MenuBar.java    License: Apache License 2.0 5 votes vote down vote up
public MenuBar(String aId)
{
    super(aId);
    
    add(new BookmarkablePageLink<>("homeLink", getApplication().getHomePage()));

    add(new BookmarkablePageLink<>("dashboardLink", ProjectDashboardPage.class)
            .add(visibleWhen(() ->  Session.get().getMetaData(CURRENT_PROJECT) != null)));

    add(new BookmarkablePageLink<>("projectsLink", ProjectsOverviewPage.class)
            .add(visibleWhen(() -> userRepository.getCurrentUser() != null)));

    add(new BookmarkablePageLink<>("adminLink", AdminDashboardPage.class)
            .add(visibleWhen(this::adminAreaAccessRequired))); 
}
 
Example 13
Source Project: the-app   Source File: NavigationPanel.java    License: Apache License 2.0 5 votes vote down vote up
private Component homePageLink() {
    BookmarkablePageLink<Void> pageLink = new BookmarkablePageLink<>("home", ShopApplication.get().getHomePage());
    pageLink.add(new AttributeAppender("class", Model.of("homePageLink"), " "));
    if (((ShopSession) ShopSession.get()).isMicroServiceMode()) {
        return new ExternalLink("home", "http://shop.microservice.io");
    }
    return pageLink;
}
 
Example 14
@Override
public boolean isActionAuthorized(Component component, Action action) {
    Class<? extends Component> componentClass = component.getClass();
    if (hasSpringSecuredAnnotation(componentClass)) {
        return isAuthorized(componentClass);
    }
    if (component instanceof BookmarkablePageLink) {
        BookmarkablePageLink<?> pageLink = (BookmarkablePageLink<?>) component;
        Class<? extends Page> pageClass = pageLink.getPageClass();
        if (hasSpringSecuredAnnotation(pageClass)) {
            return isAuthorized(pageClass);
        }
    }
    return true;
}
 
Example 15
Source Project: the-app   Source File: CheckoutPage.java    License: Apache License 2.0 5 votes vote down vote up
private Component backToShopLink() {
    return new BookmarkablePageLink<Void>("backToShopLink", HomePage.class) {
        @Override
        protected void onBeforeRender() {
            super.onBeforeRender();
            setVisible(isReadOnly());
        }
    };
}
 
Example 16
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public Link newLink(final String linkId,
                    final PageParameters pageParameters) {

    return new BookmarkablePageLink(linkId, getHomePage(), pageParameters);
}
 
Example 17
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public Link newAddToWishListLink(final String linkId,
                                 final String supplier,
                                 final String skuCode,
                                 final String quantity,
                                 final String wishList,
                                 final String tags,
                                 final String visibility,
                                 final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_ADDTOWISHLIST, skuCode);
    params.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    if (quantity != null) { // null quantity will pick min from product
        params.set(ShoppingCartCommand.CMD_P_QTY, quantity);
    }
    params.set(ShoppingCartCommand.CMD_ADDTOWISHLIST_P_TYPE, wishList != null ? wishList : CustomerWishList.SIMPLE_WISH_ITEM);
    if (visibility != null) {
        params.set(ShoppingCartCommand.CMD_ADDTOWISHLIST_P_VISIBILITY, visibility);
    } else {
        params.remove(ShoppingCartCommand.CMD_ADDTOWISHLIST_P_VISIBILITY);
    }
    if (tags != null) {
        params.set(ShoppingCartCommand.CMD_ADDTOWISHLIST_P_TAGS, tags);
    } else {
        params.remove(ShoppingCartCommand.CMD_ADDTOWISHLIST_P_TAGS);
    }
    return new BookmarkablePageLink(linkId, WishListItemAddPage.class, params);
}
 
Example 18
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public Link newRemoveCouponLink(final String linkId,
                                final String coupon,
                                final Class<Page> target,
                                final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_REMOVECOUPON, coupon);
    return new BookmarkablePageLink(linkId, target, params);
}
 
Example 19
@Override
protected void init()
{
  dataTable = createDataTable(createColumns(this, true), "title", SortOrder.DESCENDING);
  form.add(dataTable);
  final BookmarkablePageLink<Void> addTemplatesLink = UserPrefListPage.createLink("link", UserPrefArea.TASK_FAVORITE);
  final ContentMenuEntryPanel menuEntry = new ContentMenuEntryPanel(getNewContentMenuChildId(), addTemplatesLink, getString("favorites"));
  addContentMenuEntry(menuEntry);
}
 
Example 20
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public Link newChangeLocaleLink(final String linkId,
                                final String language,
                                final Class<? extends Page> target,
                                final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_CHANGELOCALE, language);
    return new BookmarkablePageLink(
            linkId,
            target == null ? getHomePage() : target,
            params);
}
 
Example 21
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public Link newChangeCurrencyLink(final String linkId,
                                  final String currency,
                                  final Class<? extends Page> target,
                                  final PageParameters pageParameters) {

    final PageParameters params = getFilteredCurrentParameters(pageParameters);
    params.set(ShoppingCartCommand.CMD_CHANGECURRENCY, currency);
    return new BookmarkablePageLink(
            linkId,
            target == null ? getHomePage() : target,
            params);
}
 
Example 22
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
private Link newBookmarkableLink(final String linkId,
                                 final String supplier,
                                 final String uriContext,
                                 final Object uri) {

    final PageParameters params = new PageParameters();
    if (StringUtils.isNotBlank(supplier)) {
        params.add(WebParametersKeys.FULFILMENT_CENTRE_ID, supplier);
    }
    params.add(uriContext, uri);
    return new BookmarkablePageLink(linkId, getHomePage(), params);
}
 
Example 23
Source Project: yes-cart   Source File: LinksSupportImpl.java    License: Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
private Link newBookmarkableLink(final String linkId,
                                 final String supplier,
                                 final String uriContext,
                                 final Object uri,
                                 final PageParameters carried) {
    
    final PageParameters params = new PageParameters(carried);
    if (StringUtils.isNotBlank(supplier)) {
        params.set(WebParametersKeys.FULFILMENT_CENTRE_ID, supplier);
    }
    params.set(uriContext, uri);
    return new BookmarkablePageLink(linkId, getHomePage(), params);
}
 
Example 24
Source Project: yes-cart   Source File: CustomerOrderPanel.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Extension hook.
 *
 * @param order order
 *
 * @return view order page link
 */
protected Link determineOrderPageLink(final CustomerOrder order, final String linkId) {

    final PageParameters viewOrder = new PageParameters();
    viewOrder.set("order", order.getCartGuid());
    return new BookmarkablePageLink(linkId, OrderPage.class, viewOrder);

}
 
Example 25
Source Project: yes-cart   Source File: AddAnyButton.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onBeforeRender() {

    final BookmarkablePageLink link = (BookmarkablePageLink) getWicketSupportFacade().links().newProductLink("link", supplier, product.getProductId());

    final String lang = getLocale().getLanguage();

    final CharSequence uri = link.urlFor(link.getPageClass(), link.getPageParameters());
    final HttpServletRequest req = (HttpServletRequest)((WebRequest) RequestCycle.get().getRequest()).getContainerRequest();
    final String absUri = RequestUtils.toAbsolutePath(req.getRequestURL().toString(), uri.toString());

    final String name = getI18NSupport().getFailoverModel(product.getDisplayName(), product.getName()).getValue(lang);

    final StringBuilder anchor = new StringBuilder()
            .append("<a class=\"a2a_dd\" href=\"http://www.addtoany.com/share_save?linkurl=")
            .append(absUri)
            .append("&amp;linkname=")
            .append(name)
            .append("\">Share</a>");

    final StringBuilder js = new StringBuilder()
            .append("<script type=\"text/javascript\">\n")
            .append("            var a2a_config = a2a_config || {};\n")
            .append("            a2a_config.linkname = \"").append(name).append("\";\n")
            .append("            a2a_config.linkurl = \"").append(absUri).append("\";\n")
            .append("            a2a_config.locale = \"").append(lang).append("\";")
            .append("            a2a_config.color_main = \"D7E5ED\";")
            .append("            a2a_config.color_border = \"AECADB\";")
            .append("            a2a_config.color_link_text = \"333333\";")
            .append("            a2a_config.color_link_text_hover = \"333333\";")
            .append("</script>");

    addOrReplace(new Label("anchor", anchor.toString()).setEscapeModelStrings(false));
    addOrReplace(new Label("js", js.toString()).setEscapeModelStrings(false));

    super.onBeforeRender();
}
 
Example 26
Source Project: yes-cart   Source File: ShoppingCartItemsList.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Create BookmarkablePageLink for add one sku to cart command.
 *
 * @param skuCode   sku code
 * @param supplier  supplier
 *
 * @return BookmarkablePageLink for add one sku to cart command
 */
private BookmarkablePageLink createAddOneSkuLink(final String skuCode, final String supplier) {
    final PageParameters paramsMap = new PageParameters();
    paramsMap.set(ShoppingCartCommand.CMD_ADDTOCART, skuCode);
    paramsMap.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    return new BookmarkablePageLink<Page>(
            ADD_ONE_LINK,
            getPage().getPageClass(),
            paramsMap
    );
}
 
Example 27
Source Project: yes-cart   Source File: ShoppingCartItemsList.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Create BookmarkablePageLink for remove one sku from cart command.
 *
 * @param skuCode   sku code
 * @param supplier  supplier
 *
 * @return BookmarkablePageLink for remove one sku from cart command
 */
private BookmarkablePageLink createRemoveOneSkuLink(final String skuCode, final String supplier) {
    final PageParameters paramsMap = new PageParameters();
    paramsMap.set(ShoppingCartCommand.CMD_REMOVEONESKU, skuCode);
    paramsMap.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    return new BookmarkablePageLink<Page>(
            REMOVE_ONE_LINK,
            getPage().getPageClass(),
            paramsMap
    );
}
 
Example 28
Source Project: yes-cart   Source File: ShoppingCartItemsList.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Create BookmarkablePageLink for remove one sku from cart command.
 *
 * @param skuCode   sku code
 * @param supplier  supplier
 *
 * @return BookmarkablePageLink for remove one sku from cart command
 */
private BookmarkablePageLink createRemoveAllSkuLink(final String skuCode, final String supplier) {
    final PageParameters paramsMap = new PageParameters();
    paramsMap.set(ShoppingCartCommand.CMD_REMOVEALLSKU, skuCode);
    paramsMap.set(ShoppingCartCommand.CMD_P_SUPPLIER, supplier);
    return new BookmarkablePageLink<Page>(
            REMOVE_ALL_LINK,
            getPage().getPageClass(),
            paramsMap
    );
}
 
Example 29
Source Project: openmeetings   Source File: RegisterDialog.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onInitialize() {
	header(new ResourceModel("113"));
	setUseCloseHandler(true);

	addButton(new SpinnerAjaxButton("button", new ResourceModel("121"), form, Buttons.Type.Outline_Primary)); // register
	addButton(OmModalCloseButton.of());
	add(form);
	add(new Label("register", getString("121")).setRenderBodyOnly(true), new BookmarkablePageLink<>("link", PrivacyPage.class));
	reset(null);
	super.onInitialize();
}
 
Example 30
Source Project: webanno   Source File: TelemetryFooterPanel.java    License: Apache License 2.0 5 votes vote down vote up
public TelemetryFooterPanel(String aId)
{
    super(aId);
    
    BookmarkablePageLink<Void> link = new BookmarkablePageLink<>("telemetry",
            TelemetrySettingsPage.class);
    
    add(link);
}