2
votes

I see everybody using MyFaces CODI or SeamFaces ViewScope Services saying that CDI don't have @ViewScope annotation

If the ViewScope serve just to retrieve the bean after each ajax call back, I think CDI provides extension to add your own implementation and fires AfterBeanDiscovery event which will be benefit to retrieve owr bean from ViewRoot Map.

See this topic http://www.verborgh.be/articles/2010/01/06/porting-the-viewscoped-jsf-annotation-to-cdi/ for more explanation.

So can anyone tell me what's the difference between this implementation and MyFaces CODI or SeamFaces ViewScope ?

Thanx in advance.

1

1 Answers

3
votes

The Seam Faces view scope is a little different, in that it behaves just like the JSF view scope but allows CDI injection as well. Also, these are prebuilt solutions vs needing to build your own solution.