2
votes

Im migrating a wicket webapplication from wicket 1.4 to wicket 6.8. Im having some problems with the bookmarkable/non bookmarkable implementation introduced in wicket 1.5.

The application now adds wicket/bookmarkable to "bookmarkable" pages when setresponsepage is called. it does not matter if i provide a class or an instance of a page. My applications keeps adding wicket/bookmarkable.

I dont want to have the wicket/bookmarkable prefix in the url. I have tried to make a new implementation of imappercontext to override these prefixes. But i dont want them at all. Actually i dont bookmarkable pages in my application at all, besides some mounted pages.

Any ideas about how to remove this prefix?

2
can we see some example code? - OnesAndZeros
Is mounting all pages an option? - tetsuo

2 Answers

1
votes

You must mount page to remove wicket/bookmarkable in the url. Override the init method and configure on your WebApplication.

@Override
public void init() {
    super.init();
    ...
    mountPage(your_url, YOUR_PAGE.class);
}
0
votes

I took a look at my code (we somewhat recently updated to Wicket 6.x) and did not notice it before, but I am also getting the 'bookmarkable' string in my url when I call

setResponsePage(SomePage.class);

however, in other places the link is set up as

setResponsePage(new SomePage());

and the 'bookmarkable' string is not included in the URL.

Hope this helps...