myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3617) NullPointerException occurs when using an EL Expression in f:viewParam name attribute
Date Thu, 27 Sep 2012 19:05:07 GMT


Leonardo Uribe commented on MYFACES-3617:

The fix is trivial, just change from :

    public String getName()
        return (String) getStateHelper().get(;


    public String getName()
        return (String) getStateHelper().eval(;

It seems a valid change. I can't find any reference in the spec or javadoc that suggest the
> NullPointerException occurs when using an EL Expression in f:viewParam name attribute
> -------------------------------------------------------------------------------------
>                 Key: MYFACES-3617
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.15
>         Environment: WebSphere Application Server 8.0 using MyFaces 2.0.15
>            Reporter: Paul Nicolucci
>   Original Estimate: 8h
>  Remaining Estimate: 8h
> When using a f:viewParm on a page and using an EL Expression in the name attribute of
the f:viewParm the following NullPointerException occurs:
> java.lang.NullPointerException
> 	at org.apache.myfaces.util.AbstractAttributeMap.get(
> 	at javax.faces.component.UIViewParameter.decode(
> 	at javax.faces.component.UIComponentBase.processDecodes(
> 	at javax.faces.component.UIInput.processDecodes(
> 	at javax.faces.component.UIComponentBase.processDecodes(
> 	at javax.faces.component.UIComponentBase.processDecodes(
> 	at javax.faces.component.UIViewRoot._processDecodesDefault(
> 	at javax.faces.component.UIViewRoot.access$400(
> 	at javax.faces.component.UIViewRoot$ApplyRequestValuesPhaseProcessor.process(
> 	at javax.faces.component.UIViewRoot._process(
> 	at javax.faces.component.UIViewRoot.processDecodes(
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
> For example the following will work:
> <f:viewParam name="firstName" value="#{userBean.user.firstName}" />
> but this would fail:
> <f:viewParam name="#{userBean.paramName1}" value="#{userBean.user.firstName}" />
> I'm willing to code up a fix for this issue, but I need a bit of help figuring out where
the fix needs to go.  It seems the EL expression works fine in the value attribute just not
in the name attribute.  However according to the JavaDocs name can be an EL Expression.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message