Message Window
Components / Samples
Description
Since
wicket-kendo-ui-6.19.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 java.util.Arrays; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.model.Model; import com.googlecode.wicket.kendo.ui.KendoIcon; 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.MessageWindow; import com.googlecode.wicket.kendo.ui.widget.window.Window; import com.googlecode.wicket.kendo.ui.widget.window.WindowButton; public class MessageWindowPage extends AbstractWindowPage { private static final long serialVersionUID = 1L; private static final List<WindowButton> BUTTONS = Arrays.asList( // lf new WindowButton(Window.OK, Window.LBL_OK), // lf new WindowButton(Window.CANCEL, Model.of("I don't care"))); public MessageWindowPage() { final Form<Void> form = new Form<Void>("form"); this.add(form); // FeedbackPanel // final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback"); form.add(feedback.setOutputMarkupId(true)); // Window // final MessageWindow window = new MessageWindow("window", "Information", "This is a sample message", BUTTONS, KendoIcon.QUESTION) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, WindowButton button) { if (button.match(OK)) { this.info("Ok has been clicked"); } else { this.warn("Cancel has been clicked"); } target.add(feedback); } }; this.add(window); // Button // form.add(new AjaxButton("button") { private static final long serialVersionUID = 1L; @Override protected String getIcon() { return KendoIcon.WINDOW_MAXIMIZE; } @Override protected void onSubmit(AjaxRequestTarget target) { window.open(target); } }); } }
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <wicket:head> <title>Wicket - Kendo UI: message window</title> </wicket:head> </head> <body> <wicket:extend> <div id="demo-panel"> <form wicket:id="form"> <button wicket:id="button">Open window</button> <br/><br/> <div wicket:id="feedback" style="width: 360px;"></div> </form> </div> <div wicket:id="window">[window]</div> </wicket:extend> </body> </html>