You're reading the documentation for Wicket Stuff 11.x, the current feature line. The 10.x long-term support documentation is the default.

JavaScript libraries

Lightbox2

lightbox2
Source Edit this page

Lightbox is a simple, unobtrusive script used to overlay images on top of the current page. It’s a snap to setup and works on all modern browsers.

Example

Java code:

add(new LightboxPanel("lightbox", "images/image-1.jpg", "images/thumb-1.jpg"));

HTML:

<wicket:container wicket:id="lightbox"></wicket:container>

With a resource reference, Java code:

ResourceReference image = new PackageResourceReference(HomePage.class,
			"resources/image-1.jpg");
ResourceReference thumbnail = new PackageResourceReference(HomePage.class,
			"resources/thumb-1.jpg");
add(new LightboxLink("link", image).add(new Image("image", thumbnail)));

HTML:

<a wicket:id="link" href="images/image-1.jpg" rel="lightbox" title="Lightbox with ResourceReference">
	<img wicket:id="image" alt="ResourceReference" />
</a>

Maven

<dependency>
    <groupId>org.wicketstuff</groupId>
    <artifactId>lightbox2</artifactId>
</dependency>

Import org.wicketstuff:wicketstuff-bom in your dependencyManagement section to manage the version.

The lightbox2-examples module contains a runnable example application.

Source: lightbox2-parent