0

I have one webapp with some beans which fits perfectly as being ViewScoped managed beans. I use one wizard managed which has the same scope too, which at one point loses its window tab; Of course when returning back the wizard is recreated. Is there any possibility to extend somehow this scope as my wizard bean not to be trashed and recreated when returning back ?

Which whould be my best bet in this case ? I used also session scope for the wizard, but I must then delete bean from context which I think is not such a nice and clean approach. (the problem is that I must make all managed properties as session scopes)

Ioan
  • 5,152
  • 3
  • 31
  • 50

1 Answers1

2

You could use CDI's conversation scope where you have to set start and end of your conversation (e.g. your wizard workflow) yourself.

However note that the injection of JSF ManagedBeans into CDI beans and vice versa is not always possible. See this related answer. Before you switch to CDI, make sure that it works in your special set-up.

If you are using a component library like Primefaces, there is a wizard component you could use as well.

Community
  • 1
  • 1
Matt Handy
  • 29,855
  • 2
  • 89
  • 112