Buy me a coffee :)

Wicket - jQuery UI

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


Components / Samples


Alike Button, AjaxButton inherits from org.apache.wicket.markup.html.form.AjaxButton.

Why two buttons in this sample?

There is a slight difference behind the action of these two buttons:
  • The action of the first button just refresh the FeedbackPanel.
  • The action of the second button re-attach the whole form in ajax. By doing this, it also re-attach nested components: buttons. This sample ensure that the display of buttons is not altered.


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

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.FeedbackPanel;

import com.googlecode.wicket.jquery.ui.form.button.AjaxButton;
import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel;

public class AjaxButtonPage extends AbstractButtonPage
	private static final long serialVersionUID = 1L;
	public AjaxButtonPage()
	private void initialize()
		final Form<Void> form = new Form<Void>("form");

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

		// Buttons //
		form.add(new AjaxButton("button1") {

			private static final long serialVersionUID = 1L;

			protected void onSubmit(AjaxRequestTarget target)

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

			private static final long serialVersionUID = 1L;

			protected void onSubmit(AjaxRequestTarget target)
	private void info(Component component)
	{ + " has been clicked");
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket jQuery UI: ajax button</title>
	<div id="demo-panel">
		<form wicket:id="form">
			<button wicket:id="button1">Ajax Button</button>
			<button wicket:id="button2">Ajax Button, full form refresh</button>
			<div wicket:id="feedback" style="width: 360px;"></div>