[ 
https://issues.apache.org/jira/browse/MYFACES-4333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092222#comment-17092222
 ] 

Bill Lucy commented on MYFACES-4333:
------------------------------------

[~tandraschko] right, for partialStateSavingDefault the 2.2 impl was already 
correct.  But in 2.3+ we need to check the current faces version for the newer 
versions.

> ElContext#getFunctionMapper Returns NULL
> ----------------------------------------
>
>                 Key: MYFACES-4333
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4333
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-344, JSR-372
>    Affects Versions: 2.2.12, 2.3.6
>            Reporter: Volodymyr Siedlecki
>            Priority: Minor
>             Fix For: 2.2.13, 2.3.7, 3.0.0, 2.3-next-M3
>
>         Attachments: JSF22-MyFaces-4333.patch, JSF23-MyFaces-4333-Fix.patch, 
> MYFACES-4333.zip
>
>
> {color:#0e101a}Hello,{color}
> {color:#0e101a}When retrieving the functionMapper from the ELContext, null is 
> returned.{color}
> {code:java}
> FacesContext facesContext = FacesContext.getCurrentInstance(); ELContext 
> elContext = facesContext.getELContext(); FunctionMapper functionMapper = 
> elContext.getFunctionMapper(){code}
> {color:#0e101a} A sample application is also attached. It works with the 
> reference implementation, but not with MyFaces. {color}
>  After looking over the code, I noticed that 
> _{color:#0e101a}FacesELContext{color}_ {color:#0e101a}is not initialized with 
> a default function mapper, and the 
> {color}_{color:#0e101a}FacesELContext{color}_{color:#0e101a}#setFunctionMapper
>  was never called. I addressed this by setFunctionMapper in the 
> {color}_{color:#0e101a}NamespaceHandler{color}_{color:#0e101a}. Please let me 
> know if you have any improvements to this fix. The behavior with my fix 
> matches how the reference implementation behaves. {color}
>  
> {color:#0e101a}Additionally, this fix worked for version 2.2, but version 2.3 
> needed another change with the partialStateSavingDefault variable. I believe 
> It's to false by accident when it's checked here: {color}
>  
> {code:java}
>    partialStateSavingDefault = "2.0".equals(facesVersion) || 
> "2.1".equals(facesVersion) || "2.2".equals(facesVersion) || (facesVersion == 
> null);
> {code}
>  
> {color:#0e101a}I wasn't sure whether to add 
> {color}_{color:#0e101a}"2.3".equals(facesVersion){color}_{color:#0e101a}, but 
> I thought it would be better to create a default state variable and keep it 
> within the StateManager.  Please advice if this change should also be applied 
> to 3.0 & master?
>  
>  Thank you{color}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to