Buy me a coffee :)

Wicket - jQuery UI

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

Ajax Slider


Components / Samples


Note: onValueChanged visibility changed to public in core-1.1 (was protected before).


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

import org.apache.wicket.Component;
import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
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.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;

import com.googlecode.wicket.jquery.core.resource.StyleSheetPackageHeaderItem;
import com.googlecode.wicket.jquery.ui.form.slider.AjaxSlider;
import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel;

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

	// Model //
	private final Model<Integer> model = Model.of(15);

	public AjaxSliderPage()

	// Methods //

	private void initialize()
		final Form<Void> form = new Form<Void>("form");

		// FeedbackPanel //
		final FeedbackPanel feedback = new JQueryFeedbackPanel("feedback");

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

		form.add(new AjaxSlider("slider", this.model, label) {

			private static final long serialVersionUID = 1L;

			public void onValueChanged(IPartialPageRequestHandler handler)
				handler.add(feedback); // do never add 'this' or the form here!

	public void renderHead(IHeaderResponse response)

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

	private void info(Component component)
	{ + " has been slided");"The model object is: " + this.model.getObject());
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket jQuery UI: ajax slider</title>
	<div id="demo-panel">
		<form wicket:id="form">
					<td width="240">
						<div wicket:id="slider"></div>
					<td width="100">
						<span wicket:id="label" id="label"></span>
			<div wicket:id="feedback" style="width: 360px;"></div>		
th, td {
	padding: 5px;