[jira] [Resolved] (MYFACES-4101) Implement f:importConstants
[ https://issues.apache.org/jira/browse/MYFACES-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonardo Uribe resolved MYFACES-4101. - Resolution: Fixed Fix Version/s: 2.3.0 > Implement f:importConstants > --- > > Key: MYFACES-4101 > URL: https://issues.apache.org/jira/browse/MYFACES-4101 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-372 >Reporter: Leonardo Uribe >Assignee: Leonardo Uribe > Fix For: 2.3.0 > > > Implement f:importConstants (See UIImportConstants for details) -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4101) Implement f:importConstants
[ https://issues.apache.org/jira/browse/MYFACES-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904143#comment-15904143 ] Leonardo Uribe commented on MYFACES-4101: - After thinking about this problem and tried some possible solutions, including the one found in Omnifaces (code is ASL 2.0 licensed, so it is compatible with our codebase), I found the solution using a custom ELResolver and a transient map to view scope is the best one. There was a possible alternative using a custom VariableMapper, but that solution does not work well when EL expressions are created from beans, so it will not work well with the new @ManagedProperty for example. The idea is constants imported with f:importConstants has view scope, so UIImportConstants should be added inside f:metadata, so in that sense it should work as view scope. Please note there is no alternative way to add constants in faces-config.xml or through annotations. > Implement f:importConstants > --- > > Key: MYFACES-4101 > URL: https://issues.apache.org/jira/browse/MYFACES-4101 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-372 >Reporter: Leonardo Uribe >Assignee: Leonardo Uribe > Fix For: 2.3.0 > > > Implement f:importConstants (See UIImportConstants for details) -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4101) Implement f:importConstants
[ https://issues.apache.org/jira/browse/MYFACES-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904248#comment-15904248 ] Leonardo Uribe commented on MYFACES-4101: - I forgot to say that use a custom VariableMapper does not work well for EL caching, because one template can be used by many views, and the variables in VariableMapper are stored inside the EL expression, and since this is a view concept it should be handled at view level. > Implement f:importConstants > --- > > Key: MYFACES-4101 > URL: https://issues.apache.org/jira/browse/MYFACES-4101 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-372 >Reporter: Leonardo Uribe >Assignee: Leonardo Uribe > Fix For: 2.3.0 > > > Implement f:importConstants (See UIImportConstants for details) -- This message was sent by Atlassian JIRA (v6.3.15#6346)