Refreshing page not calling onInit()

I have a browse page and in its oninit i am doing some calculations.

@Subscribe
protected void onInit(InitEvent event) {
    prepareFilters();
}

I have a create button also in the same page and once clicking the create button and entity is created and saved and when get back to the browse page i need to do call the same method in onInit() (prepareFilters() → this method)

When i refresh the screen also the onInit is not triggered. Its just triggered once at first load only.
is there any event that is triggered everytime the page is shown
I have tried AfterShowEvent.

Hello.

Try Data loaders handlers:
-PostLoadEvent<Entity>

-PreLoadEvent<Entity>

@mihai.maranduca
I have tried these data load events. But they are only triggered when page in loaded for first time in a tab. If open in a new tab it will trigger again. But if we do a refresh or back to list page after entity creation, these events are not getting triggered

Hi,

Screen lifecycle events are fired when the screen is created. Switching tabs and refreshing the browser page don’t re-create a screen.

If you need to do some logic when the data is changed, you can subscribe on data container events. From your description, it seems that CollectionChangeEvent is what you need.

Regards,
Gleb

@gorelov Thanks, It worked