FeedbackPanel
Components / Samples
Description
This sample shows how to use the KendoFeedbackPanel, based on Kendo UI Notification.
Since
wicket-kendo-ui-6.15.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.notification; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.form.Form; import com.googlecode.wicket.jquery.core.Options; import com.googlecode.wicket.kendo.ui.form.button.AjaxButton; import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel; public class FeedbackPanelPage extends AbstractNotificationPage { private static final long serialVersionUID = 1L; public FeedbackPanelPage() { // FeedbackConsole // Options options = new Options(); options.set("button", true); final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback", options); this.add(feedback); // Form // final Form<Void> form = new Form<Void>("form"); this.add(form); // Buttons // form.add(new AjaxButton("info") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { this.info("Sample info message"); target.add(feedback); } }); form.add(new AjaxButton("success") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { this.success("Sample success message"); target.add(feedback); } }); form.add(new AjaxButton("warning") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { this.warn("Sample warning message"); target.add(feedback); } }); form.add(new AjaxButton("error") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { this.error("Sample error message"); target.add(feedback); } }); form.add(new AjaxButton("all") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { this.info("Sample info message"); this.success("Sample success message"); this.warn("Sample warning message"); this.error("Sample error message"); target.add(feedback); } }); } }
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <wicket:head> <title>Wicket Kendo UI: feedback panel</title> </wicket:head> </head> <body> <wicket:extend> <form wicket:id="form"> <button wicket:id="info">Info</button> <button wicket:id="success">Success</button> <button wicket:id="warning">Warning</button> <button wicket:id="error">Error</button> <button wicket:id="all">All</button> </form> <br/> <div wicket:id="feedback"></div> </wicket:extend> </body> </html>