Skip to main content
Version: Java (Groovy)

Add clickable links to a Deephaven table

This guide will show you how to add clickable links to a Deephaven table.

Any string column can contain links. To add clickable links to a Deephaven table, simply create a table with a string column and add links. Any string that is properly formatted as a URL will appear as a clickable link.

result = newTable(
stringCol(
"Strings",
"https://deephaven.io/",
"link: https://deephaven.io/",
"deephaven.io (invalid link)",
"two links in one cell: https://deephaven.io / https://deephaven.io/core/docs/"
)
)

An input table allows the user to type input directly into the table's cells. Just like with a standard Deephaven table, any string that is correctly formatted as a valid URL will appear as a clickable link.

import io.deephaven.engine.table.impl.util.AppendOnlyArrayBackedInputTable
import io.deephaven.engine.table.ColumnDefinition
import io.deephaven.engine.table.TableDefinition

tableDef = TableDefinition.of(
ColumnDefinition.ofString("Title"),
ColumnDefinition.ofString("Link")
)

result = AppendOnlyArrayBackedInputTable.make(tableDef)

A link acts like any input in the table. Simply type (or paste) a valid link into a cell. That's it! Click the Commit button that appears to finalize your changes.

img

Invalid input

Note that valid links must be complete. See the example below:

img