Dataprovider.refreshAll() method updating sessions LastRequestTimeStamp

I have a dialog in which im using grid
In this grid to update the table I’m calling the dataprovider.refreshAll() method every 30sec so until this window is open this method will get called in every 30sec.

If i keep that dialog open the user does not get logged out after the inactivity period.

When i was debugging the issue i got to know that the in my session the LastRequestTimeStamp is getting updated every 30sec thats why user is not getting logged out

If i comment the dataprovider.refreshAll() in code the user gets logged out after an inactive period and the lastRequestTimeStamp in session does not update frequently

I have invested a lot of time to find the root cause but didnt get success can anyone help

Or is there any alternative method for dataprovider.refreshAll() ?
For updating the data


call setItems everytime to refresh the grid

This is the expected behavior

Are you sure ?
So i can talk with my manager about it.

My window extends Dialog

before refreshing the data im checking

    Optional<UI> myui = getUI();
    if (ui.isPresent() ) {

//Then im refreshing the data every 30sec
}else {
//no further refresh

does getUI() will always returns true until the window open?
because if i close the window the getUI() returns false and every thing works normally :slightly_smiling_face:


Yes because if the browser window/tab is open with your app there will be a heartbeat

Thanks Man :+1:

You can use closeIdleSessions = true to get the intended behaviour, see this:

Thanks will try the solution and let you know :+1:

Actually closeIdleSessions = true does not help here. It is because Grid refreshAll will include request back to the server (required for keeping states in sync), which will update lastRequestTimeStamp. This is something that should be perhaps added to Grid documentation.