I have 3 pages and they are responsible for fetching objects in my databases based on the first page selection filter.
My site is about car ads and has the following structure:
-
First page: You are responsible for the user selection filter.
-
2nd page: This is the datatable page with the first page filter results.
-
3rd page: It is related to car details
I've used @SessionScoped
in my project to be able to do what I want and "got" it that way, but the problem is that when I'm on the third, fourth, fifth page of datatable
, clicking a row of ad details and return to the datatable
page, instead of it returning to the page I was in, it returns to the first one no matter where it is. It always returns to the first page ...
Because of this, I tried to change my bean
to use @ViewScoped
. I thought it would solve my problem, but when I come back from the third page of the site to the second, the datatable
loses the filter data (for being @ViewScoped
).
I have used the Lazyload
context, but I do not think it matters for the case.
My need is for the user to click on an ad and if he wants to go back exactly to the page he was, he can.