Clickable Custom Layout - Vaadin Add-on Directory
CustomLayout that can notify when template's elements are clickedA 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:
Author Homepage
Discussion Forum
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".Discussion Forum
Clickable Custom Layout version 0.9.0
null
Clickable Custom Layout version 0.9.1
Includes the Apache 2.0 License
Clickable Custom Layout version 0.9.2
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.