Directory

← Back

ClickableTextRenderer

Clickable text in Grids (v7)

Author

Contributors

Rating

A Renderer for Grid which makes a cell value clickable and look like a link. This is in particular useful for drill-down scenario.

See GitHub for more documentation and usage examples.

If you want the equivalent renderer for Grids in Vaadin v8 then have a look here: https://vaadin.com/directory/component/clickabletextrenderer-v8.

Future development will happen on the v8 renderer only. Expect this v7 renderer to be in care & maintenance mode .. meaning you shouldn't expect bug fixes here, but on the v8 sibling.

Sample code

// Create a listener which defines what to do when 
// link is clicked
ClickableRenderer.RendererClickListener myListener
        = (ClickableRenderer.RendererClickEvent event) -> {
            // Do something here. Use event.getItemId() to figure out
            // which row was clicked.
        };

// Add the renderer to some column 
// (column is expected to have a PRESENTATION type of String)
grid.getColumn("city").setRenderer(new ClickableTextRenderer(myListener));

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

Downgraded to work with Java 7 too.

Released
2017-03-12
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.4+ in 1.0.2
Browser
N/A
Online