Buy me a coffee :)

Wicket - jQuery UI

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

Secured Button

Components / Samples





Kendo UI "Core" is Apache License 2.0 licensed, starting from version 2014.1.416.
Prior to version 2014.1.416, Kendo UI "Web" was licensed under GPLv3.

A pro version - with a commercial license - is also available, it provides additional widgets (see
To be able to use it, you need to change the ResourceReference with kendo.all.min.js

See also



  • Java
  • HTML
  • CSS
package com.googlecode.wicket.jquery.ui.samples.kendoui.button;

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

import com.googlecode.wicket.jquery.core.IJQuerySecurityProvider;
import com.googlecode.wicket.jquery.ui.samples.SampleRoles;
import com.googlecode.wicket.jquery.ui.samples.SampleSession;
import com.googlecode.wicket.jquery.ui.samples.panel.LoginPanel;
import com.googlecode.wicket.kendo.ui.form.button.SecuredAjaxButton;
import com.googlecode.wicket.kendo.ui.form.button.SecuredButton;
import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;

public class SecuredButtonPage extends AbstractButtonPage implements IJQuerySecurityProvider
	private static final long serialVersionUID = 1L;

	public SecuredButtonPage()
		this.add(new LoginPanel("login"));

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

		/* FeedbackPanel */
		form.add(new KendoFeedbackPanel("feedback"));

		/* Button 1: The Session extends IJQuerySecurityProvider, no need to provide the IJQuerySecurityProvider parameter */
		form.add(new SecuredButton("submit", SampleRoles.DEMO_ROLE) {

			private static final long serialVersionUID = 1L;

			public void onSubmit()

		/* Button 2: The Page (this) extends IJQuerySecurityProvider, we pass it to the constructor */
		form.add(new SecuredAjaxButton("button", this, SampleRoles.DEMO_ROLE) {

			private static final long serialVersionUID = 1L;

			protected void onSubmit(AjaxRequestTarget target)

	 * @see IJQuerySecurityProvider#hasRole(String...)
	public boolean hasRole(String... roles)
		return SampleSession.get().hasRole(roles);

	private final void info(Component component)
	{ + " has been clicked");
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket - Kendo UI: secured button</title>
	<div id="demo-panel">
		<div wicket:id="login" style="float: right;"></div>
		<form wicket:id="form">
			<button wicket:id="submit">Submit</button>
			<button wicket:id="button">Ajax Button</button>
			<div wicket:id="feedback" style="width: 360px;"></div>