Click, doubleclick, enter, ctrl-enter behaviour in lookup screens

Hi,

in a browse screen, a double-click on a row is opening the editor
in a lookup screen a double-click is triggering the selection

We want to change that, so that a double click is opening the editor also in a lookup screen,
but cannot find out how to handle that.

And,
when moving the mouse over the edit button in a lookup screen,
we see the hint: Enter
when moving the mouse over the Select button in a lookup screen,
we see the hint: Ctrl-Enter

But, selecting a row and press on enter also triggers the lookupSelectAction.
That is confusing.

Regards
Roland

Hello,

You can change this behavior in AfterShowEvent of your Lookup screen. For instance:

@Autowired
private GroupTable<Order> ordersTable;
@Named("ordersTable.edit")
private EditAction<Order> ordersTableEdit;

@Subscribe
public void onAfterShow(AfterShowEvent event) {
    if (getSelectHandler() != null) {
        ordersTable.setEnterPressAction(ordersTableEdit);
        ordersTable.setItemClickAction(ordersTableEdit);
    }
}

I’ve created an issue: Haulmont/jmix-ui#783

1 Like