TooltipBehavior with String as content
Hover me to give you a tip!
Hover me to give you another tip!
Components / Samples
Description
This is a simple use of a TooltipBehavior
with plain text used as content.
Required markup & options
http://docs.telerik.com/kendo-ui/api/javascript/ui/tooltipSince
wicket-kendo-ui-6.20.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.tooltip; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.Model; import com.googlecode.wicket.jquery.core.Options; import com.googlecode.wicket.kendo.ui.widget.tooltip.TooltipBehavior; public class DefaultKendoTooltipPage extends AbstractTooltipPage { private static final long serialVersionUID = 1L; public DefaultKendoTooltipPage() { // label 1 // final Label label1 = new Label("label1", "Hover me to give you a tip!"); this.add(label1); label1.add(new TooltipBehavior(new Options("position", Options.asString("top")))); // label 2 // final Label label2 = new Label("label2", "Hover me to give you another tip!"); this.add(label2); label2.add(new TooltipBehavior(Model.of("Another tooltip"))); } }
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <wicket:head> <title>Wicket Kendo UI: tooltip</title> </wicket:head> </head> <body> <wicket:extend> <div id="demo-panel"> <p/> <p/> <span wicket:id="label1" title="Sample Tooltip"></span> <p/> <p/> <span wicket:id="label2"></span> <p/> <p/> </div> </wicket:extend> </body> </html>