Way to reset the page properly in tabbed Mode

Hi team,

Is there any way to handle the reset current page without reposition the tab in tab mode.

 protected void resetPage() {
        log.debug("Resetting list view page");
        closeWithDefaultAction();
        viewBuilders.view(UiComponentUtils.getCurrentView(), this.getClass())
                .withOpenMode(ViewOpenMode.THIS_TAB)
                .open();
    }

It will re-position the tab to the last one. eg (before ):
{22604EEC-D997-4F1C-A565-40A2B0326095}

after eg:
{D82282D7-7AB1-4E8E-9222-7AFECF97F335}

from the example , it will found that the position will be moved to last one. My question is : how to maintain the position in the tab when resetting the page or do you have better way to handle this / reset the current page properly ?

I really appreciate your help.

Thank you.
Best Regard,
Chee Hao

Hi,

As I see from your code, you are don’t refresh the view, instead you re-create it, as a result a new view is added to the last position.

Depending on the view. For some views, it will be enough to reload the data. For others, set the default values for the fields.

Regards,
Gleb