I am working with Spring boot, security and Thymeleaf: I have a table with the data from a database, I have created filters, when I select a value, the table show the data filtered, so I want to implement multiple filters and keep the value selected when I change the page. So I had the idea to create variables where I can keep the selected values:
private Optional <TRACKING_CARD> typeSelected;
private Optional <STATUS> statusSelected;
private Optional <Boolean> flagStaff;
and when I select the values:
typeSelected = filter.getType();
statusSelected = filter.getStatus();
flagStaff = filter.getFlag();
But the problem is that the variables are global, so if more than one user is logged in the same time, they share the value of the variables.
How can solve this?
Thanks