[ https://issues.apache.org/jira/browse/MYFACES-4333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091902#comment-17091902 ]
Bill Lucy commented on MYFACES-4333: ------------------------------------ One thing - for the 2.3 patch, we shouldn't assume that partialStateSavingDefault should be true, since that could change behavior for apps with faces-config versions less than 2. Aside from that, the patch makes sense to fix this behavior - can you do github PRs? > 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 > 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)