beeCoder
beeCoder

Reputation: 485

Wicket Bookmarkable link

I have created a new link in the Welcome.java as the following

private Link<Void> drawLink;

drawLink = new BookmarkablePageLink<Void>("drawSome", drawSomething.class);
add(drawLink);

The following goes in the Webpage.html

<li>
<a href="#" wicket:id="drawSome">Draw</a>           
</li>

There are two issues I want to fix.

  1. I get the url as

    localhost/project-name/wicket/bookmarkable/package-name.drawSomething?0

but I wanted the link to be as

localhost/project-name/drawSomething?0

  1. As the drawSomething is a new page added to the project, like welcome page I am having a drawSomethign.properties file for page.icon and page.title.

    page.title=D3 vis page.icon=images/home_page.png

The drawSomething page loads the page title but throws an error for the image as could not resolve images folder.

But I have images folder in src/main/webapp/images/home_page.png

Can anyone please help me resolve both the issues.

Upvotes: 1

Views: 804

Answers (1)

Martin
Martin

Reputation: 1273

Do this during you application initailization:

@Override
protected void initialize() {
    mountPage("drawSomething", drawSomething.class);
}

Path to the images folder is relative to webroot path, try ../images/home_page.png

Upvotes: 4

Related Questions