Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:35:41+00:00 2026-05-13T11:35:41+00:00

In the Wicket Application class I have mounted a page at the location /about

  • 0

In the Wicket Application class I have mounted a page at the location /about

mountBookmarkablePage("about", AboutPage.class);

I verify that the about page is available at /about. Then in the page which needs a link to the about page, I use the Wicket Link class:

add(new Link("link") {

            @Override
            public void onClick() {
                setResponsePage(AboutPage.class);
            }

        };
)

The links work as expected but the target URL diplayed in the browser status bar when the mouse is over the link looks like

http://localhost:8080/?wicket:interface=:0:linkpage:repeating:1:link::ILinkListener::

A workaround which I have found is to use ExternalLink

new ExternalLink("link", "/about", "about");

This changes the target URL to

http://localhost:8080/about

which is displayed in the browser status bar when the mouse is over the link.

Is there a way to use the mounted URL as the target link with Wicket Link class, or is there a way to get the mount location for a class, so that I can use it to build the link url for AboutPage.class (instead of hard coding it in the ExternalLink constructor)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:35:42+00:00Added an answer on May 13, 2026 at 11:35 am

    For this purpose you should use BookmarkablePageLink (as you’re saying you’re doing), to set the link label (or any other content for that matter) just call .add(Component... c) since BookmarkablePageLink is actually a MarkupContainer.

    So, to create a link to AboutPage.class you need to do this:

    BookmarkablePageLink aboutLink = new BookmarkablePageLink("link", AboutPage.class);
    aboutLink.add(new Label("linkText", "Go to About page"));
    add(aboutLink);
    

    and the matching markup

    <a wicket:id="link"><span wicket:id="linkText">Link text goes here</span></a>
    

    Yeppers, it’s slightly more verbose but also very easily extensible. If you want to, you can create your own convenience subclass of BookmarkablePageLink called BookmarkableTextLink and have a

    new BookmarkableTextLink(String id, Class<Page> pageClass, String linkText);
    

    constructor for it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Google Appengine/Guice/Wicket Application. My problem is that due to the mapping
I have a wicket application which can be deployed in different environments. One of
I have a Wicket AuthenticatedWebApplication which has several pages and features that need to
So, I have an web-based application that is using the Wicket 1.4 framework, and
Working on a Wicket application that adds markup to the DOM after onLoad via
I occasionally have some long running AJAX requests in my Wicket application. When this
I've deployed an Apache Wicket web-application that uses Spring and Hibernate to my Tomcat
I'm working on a Wicket-based web application. In the application there are buttons that
I have written my Container<T> class which backups its T items in several collections
I have a Java EE 6 Wicket application deployed with maven using IntelliJ IDEA

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.