Input Window
Components / Samples
Description
Since
wicket-kendo-ui-6.17.0Licensing
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-referencesSources
- 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 org.apache.wicket.model.Model; 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.InputWindow; public class InputWindowPage extends AbstractWindowPage { private static final long serialVersionUID = 1L; public InputWindowPage() { // FeedbackPanel // final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback"); this.add(feedback); // Form // final Form<Void> form = new Form<Void>("form"); this.add(form); // Window // final InputWindow<String> window = new MyInputWindow("window") { private static final long serialVersionUID = 1L; @Override protected void onOpen(IPartialPageRequestHandler handler) { super.onOpen(handler); // important handler.add(feedback); // clear previous messages } @Override protected void onSubmit(AjaxRequestTarget target) { this.info("ModelObject: " + this.getModelObject()); target.add(feedback); } @Override public void onClose(IPartialPageRequestHandler handler) { this.info("Window 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 input window is an inner class to ease the l10n of button.<br> * Therefore the new button value(s) are located in InputWindowPage$MyInputWindow.properties */ private abstract static class MyInputWindow extends InputWindow<String> { private static final long serialVersionUID = 1L; private MyInputWindow(String id) { super(id, "My Input Window", Model.of(""), "Please provide a value:"); } } }
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <wicket:head> <title>Wicket Kendo UI: window (input)</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>