Notification
Components / Samples
Description
This sample shows how to use the Kendo UI Notification.
The notifications will pop-up in the bottom-right of the page by default.
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.kendo.ui.form.button.AjaxButton; import com.googlecode.wicket.kendo.ui.widget.notification.Notification; public class DefaultNotificationPage extends AbstractNotificationPage { private static final long serialVersionUID = 1L; public DefaultNotificationPage() { // Notification // final Notification notification = new Notification("notification"); this.add(notification); // 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) { notification.info(target, "Sample info message"); } }); form.add(new AjaxButton("success") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { notification.success(target, "Sample success message"); } }); form.add(new AjaxButton("warning") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { notification.warn(target, "Sample warning message"); } }); form.add(new AjaxButton("error") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { notification.error(target, "Sample error message"); } }); } }
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <wicket:head> <title>Wicket Kendo UI: notification</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> </form> <br/> <div wicket:id="notification"></div> </wicket:extend> </body> </html>