Buy me a coffee :)

Wicket - jQuery UI

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

Range Slider

[-32, 64]

Components / Samples





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.RangeSlider;
import com.googlecode.wicket.jquery.ui.form.slider.RangeValue;
import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel;

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

	// Models //
	public RangeSliderPage()
		final Form<RangeValue> form = new Form<RangeValue>("form", Model.of(new RangeValue(-32, 64)));

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

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

		form.add(new RangeSlider("slider", form.getModel(), label).setMin(-128).setMax(128));

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

			private static final long serialVersionUID = 1L;

			public void onSubmit()
			{, form);

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

			private static final long serialVersionUID = 1L;

			protected void onSubmit(AjaxRequestTarget target)
			{, form);

	// Methods //

	public void renderHead(IHeaderResponse response)

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

	private void info(Component component, Form<?> form)
		RangeValue value = (RangeValue) form.getModelObject(); // need to cast because 'form' argument is generic with ? + " has been clicked");"lower value is %d and upper value is %d", value.getLower(), value.getUpper()));
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket jQuery UI: range 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>
			<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;