[jira] [Commented] (MYFACES-3981) Unable to resolve Integer API as Lambda expression in a facelet
[ https://issues.apache.org/jira/browse/MYFACES-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14949074#comment-14949074 ] Bill Lucy commented on MYFACES-3981: Thanks for the comments. What you've suggested [~lu4242] makes sense.. I've attached a patch which takes those points into consideration: I added a resolver that just extends our ScopedAttributeResolver, and is placed on the resolver chain just before it. Usage of that new resolver (ImportHandlerResolver) is gated on a custom property, org.apache.myfaces.SUPPORT_EL_3_IMPORT_HANDLER, which is false by default. In that resolver, EL 3.0 functionality is enabled via reflection. Is this an appropriate property name, or do we want something more generic, such as SUPPORT_EL_3, etc.? That could possibly allow us to gate future EL "improvements" more easily. > Unable to resolve Integer API as Lambda expression in a facelet > --- > > Key: MYFACES-3981 > URL: https://issues.apache.org/jira/browse/MYFACES-3981 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344 >Affects Versions: 2.2.7 >Reporter: Anup >Priority: Minor > Attachments: MYFACES-3981.patch, myfaces-3981-2.2.8.patch > > > Following testcases does not print anything in a facelet > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MYFACES-3981) Unable to resolve Integer API as Lambda expression in a facelet
[ https://issues.apache.org/jira/browse/MYFACES-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14943975#comment-14943975 ] Bill Lucy commented on MYFACES-3981: You're right, this won't work with an pre-EL-3 implementation. We will need to gate the fix with the EL version. A more immediate problem is that this doesn't even compile with the current project setup - it looks like we compile against the EL 2.2 api/impl. > Unable to resolve Integer API as Lambda expression in a facelet > --- > > Key: MYFACES-3981 > URL: https://issues.apache.org/jira/browse/MYFACES-3981 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344 >Affects Versions: 2.2.7 >Reporter: Anup >Priority: Minor > Attachments: myfaces-3981-2.2.8.patch > > > Following testcases does not print anything in a facelet > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MYFACES-3981) Unable to resolve Integer API as Lambda expression in a facelet
[ https://issues.apache.org/jira/browse/MYFACES-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14943985#comment-14943985 ] Thomas Andraschko commented on MYFACES-3981: Yep thats true - same as: https://issues.apache.org/jira/browse/MYFACES-4008 We could of course use reflection but thats not a good way IMO. We should update the servlet 3.1 (for ticket 4008) and EL 3 and do something like: if (el3Available) {ImportHandler} This should also work fine for el 2.2 as the code is only executed with EL 3.0. We use some of such statements in PrimeFaces and this is working fine. [~lu4242] WDYT? > Unable to resolve Integer API as Lambda expression in a facelet > --- > > Key: MYFACES-3981 > URL: https://issues.apache.org/jira/browse/MYFACES-3981 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344 >Affects Versions: 2.2.7 >Reporter: Anup >Priority: Minor > Attachments: myfaces-3981-2.2.8.patch > > > Following testcases does not print anything in a facelet > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MYFACES-3981) Unable to resolve Integer API as Lambda expression in a facelet
[ https://issues.apache.org/jira/browse/MYFACES-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14944429#comment-14944429 ] Leonardo Uribe commented on MYFACES-3981: - We cannot really change the dependencies of core. Instead, the used hack is do a check on the classpath to identify when EL 3.0 is being used. Take a look at org.apache.myfaces.el.unified.ResolverBuilderForFaces For implement JSF 2.2 section 5.6.2.8 (EL 3.0 support), there are some lines that check for "javax.el.StaticFieldELResolver" class. This is not a bug, instead it is an improvement (it should be enabled/disabled using a web config param, by default disabled), because JSF 2.2 is java 6 compatible, not java 8. The right way to do it is add a EL Resolver at the end of the chain (after list.add(new BeanELResolver()) or maybe use an alternate ScopedAttributeResolver) and on that resolver add the missing lines (the ones provided in the patch), just like javax.el.StaticFieldELResolver is added. > Unable to resolve Integer API as Lambda expression in a facelet > --- > > Key: MYFACES-3981 > URL: https://issues.apache.org/jira/browse/MYFACES-3981 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344 >Affects Versions: 2.2.7 >Reporter: Anup >Priority: Minor > Attachments: myfaces-3981-2.2.8.patch > > > Following testcases does not print anything in a facelet > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MYFACES-3981) Unable to resolve Integer API as Lambda expression in a facelet
[ https://issues.apache.org/jira/browse/MYFACES-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14936743#comment-14936743 ] Thomas Andraschko commented on MYFACES-3981: The patch looks fine but will it also work correctly with a EL 2.x implementation? > Unable to resolve Integer API as Lambda expression in a facelet > --- > > Key: MYFACES-3981 > URL: https://issues.apache.org/jira/browse/MYFACES-3981 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344 >Affects Versions: 2.2.7 >Reporter: Anup >Priority: Minor > Attachments: myfaces-3981-2.2.8.patch > > > Following testcases does not print anything in a facelet > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MYFACES-3981) Unable to resolve Integer API as Lambda expression in a facelet
[ https://issues.apache.org/jira/browse/MYFACES-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14517114#comment-14517114 ] Bill Lucy commented on MYFACES-3981: Additionally, I've created a spec issue for the topic of static EL resolution in general: https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1368 Unable to resolve Integer API as Lambda expression in a facelet --- Key: MYFACES-3981 URL: https://issues.apache.org/jira/browse/MYFACES-3981 Project: MyFaces Core Issue Type: Bug Components: JSR-344 Affects Versions: 2.2.7 Reporter: Anup Priority: Minor Attachments: myfaces-3981-2.2.8.patch Following testcases does not print anything in a facelet h:outputText id=out6 value=#{Integer.numberOfTrailingZeros(16)}/ h:outputText id=out7 value=#{((firstStr, secondStr)- (Integer.compare(firstInt,secondInt)))(5,6)} / -- This message was sent by Atlassian JIRA (v6.3.4#6332)