what is @WindowScoped bean in jsf and how to use it?
@WindowScoped is one of the useful annotation given by JSF from its based scopes as follows,
"The window-scope is like a session per window. That means the data is bound to a window/tab and it not shared between windows (like the session scope does)."
And use case is very simple, if you dont want to keep the data accross the browser, instead the workable tab or window then go for this scope.
You can use this in a similar fashion how the other scoped annotation used in JSF on your bean or model class.
- public class MyBean implements Serializable
- //bean proeprties and methods.