Buy me a coffee :)

Wicket - jQuery UI

jQuery UI integration in Wicket 6.x, Wicket 7.x , Wicket 8.x & Wicket 9.x

Sliders, with options

Model object is: 16
Model object is: 4

Components / Samples


The Slider is a form component, having a IModel. Additionally a Label could be used to dynamically display the value as it's changing


package com.googlecode.wicket.jquery.ui.samples.jqueryui.slider;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.Model;

import com.googlecode.wicket.jquery.core.resource.StyleSheetPackageHeaderItem;
import com.googlecode.wicket.jquery.ui.form.button.AjaxButton;
import com.googlecode.wicket.jquery.ui.form.button.Button;
import com.googlecode.wicket.jquery.ui.form.slider.Orientation;
import com.googlecode.wicket.jquery.ui.form.slider.Slider;
import com.googlecode.wicket.jquery.ui.form.slider.Slider.Range;
import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel;

public class OptionSliderPage extends AbstractSliderPage
	private static final long serialVersionUID = 1L;

	// Models //
	private final Model<Integer> model1 = Model.of(16);
	private final Model<Integer> model2 = Model.of(4);

	public OptionSliderPage()
		final Form<Void> form = new Form<Void>("form");

		// FeedbackPanel //
		form.add(new JQueryFeedbackPanel("feedback"));

		// Sliders //
		final Label label1 = new Label("label1", this.model1); // the supplied model allows the initial display

		form.add(new Label("model1", this.model1));
		form.add(new Slider("slider1", this.model1, label1).setRange(Range.MIN).setMax(120).setStep(16));

		final Label label2 = new Label("label2", this.model2); // the supplied model allows the initial display

		form.add(new Label("model2", this.model2));
		form.add(new Slider("slider2", this.model2, label2).setOrientation(Orientation.VERTICAL).setMin(1).setMax(10).setStep(3));

		// Buttons //
		form.add(new Button("submit") {

			private static final long serialVersionUID = 1L;

			public void onSubmit()

		form.add(new AjaxButton("button") {

			private static final long serialVersionUID = 1L;

			protected void onSubmit(AjaxRequestTarget target)

	// Methods //

	public void renderHead(IHeaderResponse response)

		response.render(new StyleSheetPackageHeaderItem(OptionSliderPage.class));

	private void info(Component component)
	{ + " has been clicked");
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket jQuery UI: slider, with options</title>
	<div id="demo-panel">
		<form wicket:id="form">
				<!-- horizontal slider -->
					<td width="25">
						<span wicket:id="label1"></span>
					<td width="240">
						<div wicket:id="slider1"></div>
					<td width="240">
						Model object is: <span wicket:id="model1"></span>
				<!-- vertical slider -->
						<span wicket:id="label2"></span>
						<div wicket:id="slider2"></div>
						Model object is: <span wicket:id="model2"></span>
			<input wicket:id="submit" type="submit" value="Submit" />
			<button wicket:id="button">Ajax Button</button>
			<div wicket:id="feedback" style="width: 360px;"></div>
th, td {
	padding: 5px;