[seam-issues] [JBoss JIRA] Commented: (SEAMFACES-94) Add @Named to producer for ExternalContext

Brian Leathem (JIRA) jira-events at lists.jboss.org
Sun Mar 13 14:06:45 EDT 2011


    [ https://issues.jboss.org/browse/SEAMFACES-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587611#comment-12587611 ] 

Brian Leathem commented on SEAMFACES-94:
----------------------------------------

Table 5-10 of the JSF 2.1 specification lists the EL implicit objects. "ExternalContext" is indeed not an implicit object.

> Add @Named to producer for ExternalContext
> ------------------------------------------
>
>                 Key: SEAMFACES-94
>                 URL: https://issues.jboss.org/browse/SEAMFACES-94
>             Project: Seam Faces
>          Issue Type: Enhancement
>          Components: CDI Integration
>    Affects Versions: 3.0.0.CR1
>            Reporter: Dan Allen
>            Priority: Minor
>             Fix For: 3.0.0.Final
>
>
> JSF exposes facesContext as an implicit EL variable that references the current FacesContext. However, no such implicit EL variable is available for ExternalContext. There is useful information in the ExternalContext that is often needed in the UI, particular during development. Thus, we should expose this implicit variable by adding @Named to the producer for ExternalContext.
> @Named
> @Produces
> @RequestScoped
> public ExternalContext getExternalContext(final FacesContext context) {
>     return context.getExternalContext();
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list