Selecting row in Table goes to the previous selected row

Hi there,

I came across something unexpected. I was building a form with a table in which a user can edit data. If you select a row, edit someting, click on another row the focus goes back to the previous selected row. After clicking the other row again, the focus sticks. If you use the Table demo on the main cuba site you can reproduce it. Could you (or can I) change this behaviour?

Kind regards,



It is known bug (see issue) . Unfortunately, there is no easy fix for this problem.

As a workaround, you can try to replace other non-editable columns to generated with PlainTextCell.

<groupTable id="projectsTable"
        <column id="name"/>
        <column id="priority" editable="true"/>
        <column id="startDate" editable="true"/>
        <column id="endDate"/>
private GroupTable<Project> projectsTable;
private DatatypeFormatter datatypeFormatter;

public void onInit(InitEvent event) {
    projectsTable.addGeneratedColumn("name", entity ->
            new Table.PlainTextCell(entity.getName()));

    projectsTable.addGeneratedColumn("endDate", entity ->
            new Table.PlainTextCell(datatypeFormatter.formatDateTime(entity.getEndDate())));

The full example you can find here: (81.5 KB)