[
https://issues.jboss.org/browse/SEAMFACES-95?page=com.atlassian.jira.plug...
]
Brian Leathem commented on SEAMFACES-95:
----------------------------------------
Agreed with the @ApplicationScoped, but I get the error:
WELD-001435 Normal scoped bean class java.lang.Enum is not proxyable because it has no
no-args constructor., **ERROR**
Using Dependent scope, we do not get this error, presumably because Weld does not need to
proxy the Enum for Dependent Scope.
Make ProjectStage available from EL
-----------------------------------
Key: SEAMFACES-95
URL:
https://issues.jboss.org/browse/SEAMFACES-95
Project: Seam Faces
Issue Type: Feature Request
Components: CDI Integration
Affects Versions: 3.0.0.CR1
Reporter: Dan Allen
Assignee: Brian Leathem
Priority: Minor
Fix For: 3.0.0.Final
There is no easy way to reach the project stage from EL, nor can you easily check which
ProjectStage is active. The only way to access the ProjectStage is by referencing the
context parameter directly:
#{initParam['javax.faces.PROJECT_STAGE']}
Seam Faces should make it available as
#{projectStage}
This also makes it possible to check which project stage is active.
#{projectStage eq 'Development'}
Without an implicit projectStage variable, that's not possible via EL, even with
method parameters, because the signature of the comparison method is as follows:
FacesContext#isProjectStage(ProjectStage)
Since enums can't be referenced directly from EL (without an explicit producer),
there is no way to use this method. Thus, it might make sense to expose a project stage
map that allows the enum values to be referenced:
#{projectStages.Development}
Then it would be possible to execute:
#{facesContext.isProjectStage(projectStages.Production)}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira