I am creating a web application using JSF 2.2.20 in which I am implementing a "kinda wizard" flow which lets the user filling input fields and go back and forth the view pages through navigation. I am using a single bean for all these views.
Let's say I have views A.xhtml, B.xhtml, C.xhtml and D.xhtml, all managed by the same bean MyBean.java
I want my application to be "browser tab scoped", which means that
- I do not want my bean's data be re-instantiated after every HTTP Request as it happens with
@RequestScoped
beans or after view changing as it happens with@ViewScoped
, I want the data of my bean to be kept between view changes and redirections so the user can go back and forth between pages without losing the data he has already given. - I do not want to use the
@SessionScoped
scope since each time the user opens a new tab I want the bean to be re-instantiated starting from page "A.xhtml.
Is there any built-in way to achieve the scenario described above using the current JSF version? In case there is not any, could you please propose any workarounds?
Thanks in advance!