Defer execution of a datasource

Hi, I have two datasources on a screen, I want one of them is not running when you start the screen should only be run by a user event by pressing a button, you can defer the execution of datasource ?.

1 Like

Good question.
There is a special screen parameter that prevents datasources from automatic refresh caused by visual components. See JavaDocs on com.haulmont.cuba.gui.WindowParams enumeration.
Example usage:

public class CustomerBrowse extends AbstractLookup {
    public void init(Map<String, Object> params) {
        WindowParams.DISABLE_AUTO_REFRESH.set(params, true);
1 Like

thumbs up!!