We here use @WindowScoped to create a navigation path with the latest 10 *places* the user have visited and we have the requirement to keep such navigation path for each browser window separately.
On Sat, Jun 7, 2014 at 12:23 AM, Karl Kildén <[email protected]> wrote: > Sounds awesome :-) > > ConversationScoped is a do it yourself and could cover any need for this > reason but whenever you have data that is supposed to be unique per tab > then WindowScoped is very nice and a ready to use solution. > > For example a text editor with the content saved in WindowScoped bean so > they can continue to navigate around in the system, come back and write > some more etc. And they can have several cases like this active at the same > time in different tabs. Many scopes could produce the same result but > WindowScoped is quite natural for a case like this imo. > > Maybe the content needs to be saved more securely then just by memory but > "undo" and "redo" etc could still be useful to save. > > Imagine you save all user auth info in WindowScoped instead. Then Another > thing is features like "view as someone else". I like this for sites like > facebook where I want to know exactly how my profile looks like for someone > else. That button that lets you preview it could open the preview in a new > tab and simply be authorized as a random other visitor in @WindowScoped > > > cheers Karl > > > > > On 6 June 2014 19:26, Gerhard Petracek <[email protected]> wrote: > > > hi ron, > > > > first of all: great news & thx! > > > > @window-scope: > > e.g. menu-state per window or if you need to support one user per window, > > you can store the active user in a window-scoped holder. > > > > @view-controller: > > e.g. @PreRenderView to load data before the rendering-process,... > > > > you could have a look e.g. at [1] > > > > regards, > > gerhard > > > > [1] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds > > > > > > > > 2014-06-06 19:14 GMT+02:00 Ron Smeral <[email protected]>: > > > > > Hi, > > > > > > a small team in JBoss QE has started covering DeltaSpike with examples. > > > We've identified ~30 features/use-cases and come up with ~10 ideas for > > > examples that could demonstrate those features. We plan to implement > this > > > during the summer. > > > > > > However, we had a hard time thinking of real world use cases for > certain > > > features, like: > > > * multi-window handling, i.e. the window scope: What are the real uses > > for > > > this, where the conversation scope doesn't suffice? > > > * view-controller callbacks: I understand that it allows e.g. to have a > > > shared controller for multiple views (right?), which implements a > common > > > aspect, or just to easily perform operations at certain JSF phases. But > > > what would that shared aspect or those operations be, in a real > > > application? Maybe except for the classics that are logging and > security. > > > > > > I'm writing this to the dev list, as I assume that most DS committers > use > > > DS in production and can provide some insight into how DeltaSpike is > > > commonly used. > > > > > > Thanks! > > > > > > Regards, > > > Ron > > > > > > -- > > > Ron Smeral > > > JBoss Quality Engineer > > > Brno > > > > > > > > >
