Refreshing data container in V7

In v6, we can refresh the data source as follows -

plantsDs.setQuery("select e from erp$Plant e where e IN (select p.warehouse from erp$RealEstateProject p where p.id = :custom$projId)");
plantsDs.refresh(ParamsMap.of("projId", getItem().getRealEstateProject().getId()));

What will be the equivalent for Data Containers?

Hi,

Just trigger the corresponding data loader instead:

plantsDl.setQuery("select e from sample_Customer e");
plantsDl.load();
1 Like

Thank you Yuriy.

Unfortunately doesn’t work.

    @Subscribe("refreshBtn")
    private void onRefreshBtnClick(Button.ClickEvent event) {
    plantsDl.setQuery("select e from sample_Customer e");
   plantsDl.load();
}

Can you please be more specific?

Could you provide a sample project?

Inital
initial

Click Search
click_search

Click Refresh nothing happens
Click_Refresh_nothing_happens

 @Subscribe("refreshBtn")
    private void onRefreshBtnClick(Button.ClickEvent event) {
        resourcesDl.setQuery("select e from crm$Resource e");
        resourcesDl.load();
    }