This CDI extension enables support for the new JSF-2 @ViewScoped annotation.
2 steps are necessary:
We have to manually add the @ViewScoped annotation as a passivating {@link javax.enterprise.context.NormalScope}, since this annotation is neither a JSR-330 annotation nor a JSR-299 annotation and therefor doesn't get picked up automatically. This has to be before the bean scanning starts.
After the bean scanning succeeded, we register the {@link javax.enterprise.context.spi.Context} for theViewScoped. The {@link ViewScopedContext} is responsible for actually storing all our@ViewScoped contextual instances in the JSF ViewMap.
The extension automatically detects if we are in the {@link ProjectStage#UnitTest} and uses
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.