myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (MYFACES-3942) <f:viewParam binding> causes NPE because UIViewRoot is null
Date Mon, 24 Nov 2014 21:43:12 GMT

     [ https://issues.apache.org/jira/browse/MYFACES-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe resolved MYFACES-3942.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.7
         Assignee: Leonardo Uribe

Thanks to Bauke Scholtz for the report.

> <f:viewParam binding> causes NPE because UIViewRoot is null
> -----------------------------------------------------------
>
>                 Key: MYFACES-3942
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3942
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.6
>         Environment: Tomcat 8.0.14 and TomEE 2.0.0 snapshot.
>            Reporter: Bauke Scholtz
>            Assignee: Leonardo Uribe
>             Fix For: 2.2.7
>
>
> Using {{binding}} attribute on {{<f:viewParam>}} as follows:
> {code}
> <f:viewParam name="foo" binding="#{foo}" />
> {code}
> causes regardless of the binding location (Facelet itself as demonstrated above, request
scoped bean, session scoped bean, etc) the following exception: 
> {code}
> java.lang.NullPointerException
> 	at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.createComponent(ComponentTagHandlerDelegate.java:534)
> 	at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:284)
> 	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:50)
> 	at org.apache.myfaces.view.facelets.tag.jsf.core.ViewMetadataHandler.apply(ViewMetadataHandler.java:85)
> 	at org.apache.myfaces.view.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:195)
> 	at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:59)
> 	at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:48)
> 	at org.apache.myfaces.view.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:188)
> 	at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage$FaceletViewMetadata.createMetadataView(FaceletViewDeclarationLanguage.java:2752)
> 	at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:255)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> 	... 
> {code}
> Turns out that {{UIViewRoot}} is {{null}} while the code didn't expect that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message