Right method for AbstractLookup


I have to set a value in Browse screen (AbstractLookup) when (after) some modifications are made in Editor screen (after the Editor Screen is closed).
This is the code:

    public void init (or ready..doesn't matter){
    label.setValue("Last Invoice: " + lastNumberService.getCurrentNumber());

Unfortunately the value is changed only after I close/(re)open the application.

What is the right method (approach) to use?
(The project was made in Cuba 6 imported in Cuba 7).

I’ve tried this but doesn’t work:

 if (transactionsDs.getItems().size()>0) {

                Transaction transaction = transactionsDs.getItem();

                AbstractEditor editor = openEditor("crm$Transaction.edit", transaction, WindowManager.OpenType.NEW_WINDOW);
                editor.addCloseListener((String actionId) -> {
                    label.setValue("Last Invoice: #" + lastNumberService.getCurrentNumber());
                    // do something


Unfortunately addCloseListener is cut. I’m not sure what means this.

Solved: use transactionsTableCreate (Edit).setAfterWindowClosedHandler
However what means a method cut? We cannot use it anymore?

Press Ctrl-Q (Windows) or F1 (macOS) on the method name and you will see documentation on it. It will explain that the method is deprecated and what to use instead of it.

1 Like

And for LInux?

Done: Ctr+Q for LInux as well