Overview
Other MyFaces Extensions
- ExtVal
- Ext-Script
- [Orchestra]
- [Portlet Bridge]
Community
Development
Sponsorship
Your browser does not support iframes
...
This annotation allows to activate beans for a special project-stage. It's possible to use one of the out-of-the-box project-stages or a custom typesafe project-stage.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@Alternative @ProjectStageActivated(ProjectStage.UnitTest.class) public class TestServiceMockImpl implements Service { //... } |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@Alternative
@ProjectStageActivated({ProjectStage.UnitTest.class, ProjectStage.Development.class})
public class DevServiceMockImpl implements Service
{
//...
}
|
To configure a project-stage you can use the key: org.apache.myfaces.extensions.cdi.ProjectStage
and configure it for your environment (see the out-of-the-box environment-config options).
If there is no CODI project-stage configured and it's a JSF application, CODI will re-use the project-stage configured for JSF (currently the web.xml approach isn't supported because in our opinion it's a wrong and quite risky place to configure it - however, with a custom ConfiguredValueResolver
it's possible to resolve the project-stage configuration from any kind of configuration-source).
...