Directory

← Back

ContextHelp

Provides contextual help for Vaadin applications.

Author

Rating

Popularity

100+

ContextHelp is a component allowing you to provide contextual help for your forms and/or fields in an application. ContextHelp shows a bubble containing your specified help text when the user presses F1 (or a configurable hotkey). The bubble opens right next to your field, with a small arrow pointing at the field.

ContextHelp also supports opening the help bubble programmatically and follow focus.

Sample code

ContextHelp contextHelp = new ContextHelp();
layout.addComponent(contextHelp);

TextField foo = new TextField("foo");
TextField bar = new TextField("bar");
layout.addComponent(foo);
layout.addComponent(bar);

contextHelp.addHelpForComponent(bar, "The text field allows you to write many, many, many, many, many things.");
contextHelp.addHelpForComponent(foo, "<b>foo</b> can be <i>formatted</i> using standard <b style='font-size: 20px; color: red;'>HTML</b> and inline <b>CSS</b>.");
ContextHelp contextHelp = new ContextHelp();
contextHelp.extend(UI.getCurrent());    // only needed once for each UI

TextField foo = new TextField("foo");
TextField bar = new TextField("bar");
layout.addComponent(foo);
layout.addComponent(bar);

contextHelp.addHelpForComponent(bar, "The text field allows you to write many, many, many, many, many things.");
contextHelp.addHelpForComponent(foo, "<b>foo</b> can be <i>formatted</i> using standard <b style='font-size: 20px; color: red;'>HTML</b> and inline <b>CSS</b>.");

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Bugs fixed include the elusive internal NPE when changing "follow focus" state. This version can be considered feature complete (for 1.0) and reasonably stable, but I will keep it in beta for a while in case new bugs are found.

Released
2010-09-24
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.2+
Vaadin 8.0+ in 3.0.0
Vaadin 7.3+ in 2.0.1
Vaadin 7.0+ in 2.0.0.beta1
Vaadin 6.0+ in 1.3.1
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Safari

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online