Create link column fields in table


Is there a way to create a column with linking fields to another edit screen? As far as I can see, there isn’t a way to create a column without the id of a field in the current Entity. I need to have a preview link which opens another edit screen of another Entity. This is what I tried so far.

In the preview screen in the InteliJ I can see that there are previews:

But when the application is started the preview fields are lost.

How can I link another screen to the current using table and columns?
P.S A button option in the column could work too, but I can’t manage to find a way to create that either.

Thanks in advance!

Hi Mikaela,

Use a generated column. In its column generator handler you can create a LinkButton or any other component, something like this:

<column id="preview" caption="Preview"/>
    @Install(to = "usersTable.preview", subject = "columnGenerator")
    private Component usersTablePreviewColumnGenerator(User user) {
        LinkButton linkButton = uiComponents.create(LinkButton.class);
        linkButton.addClickListener(clickEvent -> {
            screenBuilders.editor(User.class, this)
        return linkButton;
1 Like