0

Where I can find wicketstuff-annotation.jar? It's used to be available at least in a Maven repo at http://wicketstuff.org/maven/repository but that doesn't exist anymore, and the Wicket Stuff homepage is not very helpful either.

Specifically, I need org.wicketstuff.annotation.mount.MountPath because I want readable URLs in my Wicket app and find annotations an elegant way to mount pages. (I wonder why this kind of stuff isn't included in core Wicket distribution...)

(Any place to download the jar from would be fine; I don't use Maven in current project.)

Jonik
  • 80,077
  • 70
  • 264
  • 372

4 Answers4

3

You can just mount your pages anywhere in your application, typically in your Application's init() method, like:

@Override
protected void init() {
    mountBookmarkablePage("/users", UsersPage.class);
}

That said, if you want to use the annotations package, it is available from Maven Central

Jonik
  • 80,077
  • 70
  • 264
  • 372
Martijn Dashorst
  • 3,652
  • 17
  • 26
  • 1
    We recently dropped annotations because of two reasons. 1. Spring Dependency 2. If you want to mount a subclassed page, it must have a different mount path in the annotation. Instead, we use Martijn's method with a `mountPage("/users", getUserPageClass());` – jbrookover Jun 27 '11 at 13:39
  • Btw, do you mean `mountBookmarkablePage()`? At least [Wicket 1.4](http://wicket.apache.org/apidocs/1.4/index-all.html) doesn't have any method named `mountPage()`. – Jonik Jun 27 '11 at 15:18
  • @jbrookover if you want a page and its subclasses to be mounted, don't you need to use different paths anyway? – tetsuo Jun 27 '11 at 22:48
  • @tetsuo We have different Wicket applications extending a core Application package. The core package had, say, an AdminPage that was good enough for most applications that extended it (and mounted at "/admin"). When a new application wanted to extend the core and provide CustomAdminPage, it "replaced" AdminPage, but could not be mounted at the same location using wicketstuff-annotations. – jbrookover Jun 30 '11 at 00:14
  • @jbrookover now I get it, you override it. Anyway, using annotations for that sort of thing isn't very safe, since the order is not guaranteed. In this case, I'd mount programmatically the page class returned by a overridable method in the application. – tetsuo Jun 30 '11 at 13:56
  • @jbrookover, as you also mentioned `mountPage` method, can you answer my question about it (above)? (I don't find such method in Wicket 1.4 or 1.5; do you mean `mountBookmarkablePage`?) – Jonik Jul 01 '11 at 06:14
  • @tetsuo - yup! That's what I do – jbrookover Jul 01 '11 at 19:01
  • 1
    @Jonik - Yes, I use `mountBookmarkablePage()` for pages, `mount()` for resources. Sorry about the confusion. – jbrookover Jul 01 '11 at 19:02
2

Update from Wicket 1.5: You should use the method mountPage() instead of mountBookmarkablePage() as that method has been removed from Wicket 1.5.

@Override
protected void init() {
    mountPage("/users", UsersPage.class);
}

https://cwiki.apache.org/WICKET/migration-to-wicket-15.html

Martin Wickman
  • 19,662
  • 12
  • 82
  • 106
1

This is the URL. You can click on Binary link to download the required jar.

Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
0

A community user today contributed an upgrade of the library to Wicket 1.5, so it will be available for next release (1.5-RC6). Until then the users of 1.5 can use it from Github repo.

martin-g
  • 17,243
  • 2
  • 23
  • 35
  • Do you mean wicketstuff-annotation will be part of Wicket 1.5 (starting from next RC)? – Jonik Jun 27 '11 at 14:11
  • @Jonik no, but until now the 1.4.x version was incompatible with wicket 1.5. Now it has been ported, and will probably be available at maven repos with the next Wicket/Wicketstuff RC. – tetsuo Jun 27 '11 at 22:51