Buy me a coffee :)

Wicket - jQuery UI

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

Window


This is my window content

Components / Samples

Description

Since

wicket-kendo-ui-6.17.0

Licensing

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 http://docs.telerik.com/kendo-ui/intro/supporting/list-of-widgets)
To be able to use it, you need to change the ResourceReference with kendo.all.min.js

See also

[howto]-change-resource-references

Sources

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

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
import org.apache.wicket.markup.html.form.Form;

import com.googlecode.wicket.kendo.ui.form.button.AjaxButton;
import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
import com.googlecode.wicket.kendo.ui.widget.window.AbstractWindow;

public class DefaultWindowPage extends AbstractWindowPage
{
	private static final long serialVersionUID = 1L;

	public DefaultWindowPage()
	{
		// FeedbackPanel //
		final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback");
		this.add(feedback);

		// Form //
		final Form<Void> form = new Form<Void>("form");
		this.add(form);

		// Window //
		final MyWindow window = new MyWindow("window", "My Window") {

			private static final long serialVersionUID = 1L;

			@Override
			protected void onOpen(IPartialPageRequestHandler handler)
			{
				super.onOpen(handler);

				handler.add(feedback); // clear previous messages
			}

			@Override
			public void onClose(IPartialPageRequestHandler handler)
			{
				this.info("Window has been closed");
				handler.add(feedback);
			}
		};

		this.add(window);

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

			private static final long serialVersionUID = 1L;

			@Override
			protected void onSubmit(AjaxRequestTarget target)
			{
				window.open(target);
			}
		});
	}

	/**
	 * This window class is located here for convenience in this sample<br>
	 * Associated markup file is DefaultWindowPage$MyWindow.html
	 */
	static class MyWindow extends AbstractWindow<Void>
	{
		private static final long serialVersionUID = 1L;

		public MyWindow(String id, String title)
		{
			super(id, title, true);
		}

		@Override
		public boolean isCloseEventEnabled()
		{
			return true;
		}
	}
}
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<head>
<wicket:head>
	<title>Wicket Kendo UI: window</title>
</wicket:head>
</head>
<body>
<wicket:extend>
	<div id="demo-panel">
		<form wicket:id="form">
			<button wicket:id="open">Open window</button>
		</form>
		<br/>
		<div wicket:id="feedback" style="width: 360px;"></div>
	</div>
	<div wicket:id="window"></div>
</wicket:extend>
</body>
</html>