Directory

← Back

Clickable Custom Layout

CustomLayout that can notify when template's elements are clicked

Author

Rating

Popularity

<100

A simple extension to CustomLayout allowing elements (

, , , etc) in the template to be marked with a "click-name" attribute. Elements marked with this attribute will cause the component to listen for mouse clicks on these elements.

Users of the ClickableCustomLayout class may register click listeners who're notified when these elements are clicked.

This is handy when dealing with custom/legacy HTML that requires super simple click handling functionality.

It's worth noting there are alternatives to using this add on, namely:

Anchors and URIFragmentUtility Wrapping things in layouts that implement LayoutClickNotifier

Sometimes the alternatives are undesirable, this add-on may help.

Example template xhtml:

A title

Some example text

This is a clickable caption

If the image or span is clicked on in the above example, listeners registered against the ClickableCustomLayout will be notified of the clicked "click-name".

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

Reports a ClickableCustomLayoutClickEvent instead of the String representing the click name. The click event exposes the X, Y position of the click as well as the click-name.

Released
2011-07-03
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.6+
Browser
Browser Independent

Clickable Custom Layout - Vaadin Add-on Directory

CustomLayout that can notify when template's elements are clicked Clickable Custom Layout - Vaadin Add-on Directory
A simple extension to CustomLayout allowing elements (
, , , etc) in the template to be marked with a "click-name" attribute. Elements marked with this attribute will cause the component to listen for mouse clicks on these elements. Users of the ClickableCustomLayout class may register click listeners who're notified when these elements are clicked. This is handy when dealing with custom/legacy HTML that requires super simple click handling functionality. It's worth noting there are alternatives to using this add on, namely: Anchors and URIFragmentUtility Wrapping things in layouts that implement LayoutClickNotifier Sometimes the alternatives are undesirable, this add-on may help. Example template xhtml:

A title

Some example text

This is a clickable caption If the image or span is clicked on in the above example, listeners registered against the ClickableCustomLayout will be notified of the clicked "click-name".
Online