Clickable Custom Layout
CustomLayout that can notify when template's elements are clicked
A simple extension to CustomLayout allowing 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:
Some example textThis 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".
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.
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.
- Apache License 2.0
- Vaadin 6.6+
- Browser Independent