Skip to content

Lightbox2 Plugin Integration

inaiat edited this page Oct 23, 2012 · 1 revision

Overview

(from http://www.jqplot.com/)

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 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>
Clone this wiki locally