Community
Participate
Working Groups
Build Identifier: We have the following EL expression: <h:outputText value="Something goes here: #{component.getClientId()}" /> Eclipse marks this with an error mark. The error mark has two descriptions: 1) "Expression must be a value expression but is a method expression" 2) "Syntax error in EL" This expression should not be marked with an error as method expressions with parameters are supported in EL 2.2. Reproducible: Always
IBM desires that this be fixed in the WTP 3.2.5 stream, if at all possible. This is critical because WTP 3.2.x is supposed to support Java EE 6. Part of the support of Java EE 6 is support for Java Server Pages 2.2/Expression Language 2.2, as per JSR 245. As such, we would like to see this issue fixed in WTP 3.2.5, if possible.
We will review this for a fix in 3.2.5 by 10/7, the date for the first RC build.
Seeing this Issue in Indigo as well. Example action="#{noteUtil.add(noteEntity)}"
Ian (or Raghu), if this has been accepted as a hotbug, can you update the title to [hotbug] (remove the _request part), as per http://wiki.eclipse.org/WTP/Hotbug_Policy ? Also, the sooner that this is fixed in HEAD for WTP 3.4.0, the better. Will the fix in HEAD not happen until M3? Or can that be done sooner? (Note: we want it fixed in 3.2.5, if possible, but a fix in HEAD would show us how big a change it is and thus the likelihood of it getting fixed in the R3_2_maintenance stream.)
Accepted as a hotbug. We will checkin the fix to HEAD. We are not able to commit to fixing this earlier than 10/7, but we will update status by the end of August.
Fix committed to HEAD at 2011/08/24 10:16AM PDT.
(In reply to comment #6) > Fix committed to HEAD at 2011/08/24 10:16AM PDT. Ian, could you attach the patch that was committed to HEAD?
Created attachment 202436 [details] Patch applied to HEAD.
Please advise whether or not you would like the patch back-ported to 3.2.5.
(In reply to comment #9) > Please advise whether or not you would like the patch back-ported to 3.2.5. Yes, please see comment 4.
Fix submitted to R3_2_maintenance stream at 2011/09/01 01:51PM PDT.
I have this warning even with Eclipse Java EE Developer Tools Version: 3.3.1.v2011 07072200-7b7II1PFSK2WIlPwJBmNz-VWwVsTn The code is: <h:outputText value="#{testBean.sayHello()}" /> And the warning is: Syntax error in EL test.xhtml /test-jee6/src/main/webapp/pages line 17 Facelet Validator
Re-opened for investigation.
Eclipse Java EE Developer Tools 3.3.1.v201107072200-7b7II1PFSK2WIlPwJBmNz-VWwVsTn Method expressions within parentheses (because of more complex expressions around them) do not work but create spurious EL Syntax errors. This expression works (no EL Syntax Error): <c:if test="${str.substring(1) eq str2.substring(1)}"> This expression does not: <c:if test="${(str.substring(1) eq str2.substring(1))}">
Please note the following expression, which according to this http://stackoverflow.com/questions/8004233/jsf-2-how-to-pass-an-action-including-an-argument-to-be-invoked-to-a-facelets-s/8004349#8004349 should be valid, too. Here's the BNF from chapter 1.19 of the EL 2.2 spec: ValueSuffix ::= ‘.’ Identifier MethodParameters? | ‘[‘ Expression ‘]’ MethodParameters? <-- Look here MethodParameters ::= '(' (Expression (‘,’ Expression )* )? ')' Please fix.
(In reply to comment #12) > I have this warning even with Eclipse Java EE Developer Tools Version: > 3.3.1.v2011 07072200-7b7II1PFSK2WIlPwJBmNz-VWwVsTn > The code is: > <h:outputText value="#{testBean.sayHello()}" /> > And the warning is: > Syntax error in EL test.xhtml /test-jee6/src/main/webapp/pages line 17 > Facelet Validator I can't reproduce this (works fine for me). Please verify that you are using JSF 2.0 or greater, where this style of EL is valid. - Ian
(In reply to comment #14) > Eclipse Java EE Developer Tools > 3.3.1.v201107072200-7b7II1PFSK2WIlPwJBmNz-VWwVsTn > Method expressions within parentheses (because of more complex expressions > around them) do not work but create spurious EL Syntax errors. > This expression works (no EL Syntax Error): > <c:if test="${str.substring(1) eq str2.substring(1)}"> > This expression does not: > <c:if test="${(str.substring(1) eq str2.substring(1))}"> This should be logged as a separate issue against the jst.jsp component of the WTP project - it is reproducible in a simple Dynamic Web Project without a JSF facet installed (so, no JSF Tools functionality involved). - Ian
(In reply to comment #15) > Please note the following expression, which according to this > http://stackoverflow.com/questions/8004233/jsf-2-how-to-pass-an-action-including-an-argument-to-be-invoked-to-a-facelets-s/8004349#8004349 > should be valid, too. Here's the BNF from chapter 1.19 of the EL 2.2 spec: > ValueSuffix ::= ‘.’ Identifier MethodParameters? > | ‘[‘ Expression ‘]’ MethodParameters? <-- Look > here > MethodParameters ::= '(' (Expression (‘,’ Expression )* )? ')' > Please fix. I'm not sure what "the following expression" refers to, but I am assuming it's something similar to "#{bean['method']('arg')}", which works fine for me. Please verify that you are using JSF 2.0 or greater. - Ian
(In reply to comment #18) snip > > I'm not sure what "the following expression" refers to, but I am assuming it's > something similar to "#{bean['method']('arg')}", which works fine for me. > Please verify that you are using JSF 2.0 or greater. > > - Ian Here's the code from a *Facelets sub view*: <ui:composition ...> ... <h:commandButton value="Fortfahren" action="#{acceptButtonBean[acceptButtonMethod](acceptButtonArgument)}" onclick="#{rich:component('repo-remove-doc-popup')}.hide(); return true;"> <f:ajax execute="@form" render="#{acceptButtonRenderId}" /> </h:commandButton> ... </ui:composition> On the line action="..." Eclipse shows a warning on the opening parenthesis: "EL syntax error: Unexpected symbol '('." My Eclipse version is 3.7 and the project has the JSF 2.0 facet enabled.
(In reply to comment #19) > (In reply to comment #18) > Here's the code from a *Facelets sub view*: > <ui:composition ...> > ... > <h:commandButton value="Fortfahren" > > action="#{acceptButtonBean[acceptButtonMethod](acceptButtonArgument)}" > > onclick="#{rich:component('repo-remove-doc-popup')}.hide(); return true;"> > <f:ajax execute="@form" render="#{acceptButtonRenderId}" /> > </h:commandButton> > ... > </ui:composition> > On the line action="..." Eclipse shows a warning on the opening parenthesis: > "EL syntax error: Unexpected symbol '('." > My Eclipse version is 3.7 and the project has the JSF 2.0 facet enabled. ----- Thanks for the extra info. I'm still not seeing the issue, but I think we may be closing on on why you still are. This was fixed in the HEAD stream (which will be released as WTP 3.4.0) and back-ported to WTP 3.2.5 (Helios stream). It is not targeted to be fixed in any 3.3.x (Indigo) stream. So, more important than your Eclipse version, what is your WTP version? Thanks, - Ian
(In reply to comment #17) > (In reply to comment #14) > > This expression works (no EL Syntax Error): > > <c:if test="${str.substring(1) eq str2.substring(1)}"> > > This expression does not: > > <c:if test="${(str.substring(1) eq str2.substring(1))}"> > > This should be logged as a separate issue against the jst.jsp component of the > WTP project - it is reproducible in a simple Dynamic Web Project without a JSF > facet installed (so, no JSF Tools functionality involved). Originally, when I wanted to report that bug, the bug tracker suggested I should add a comment to this bug (I guess because of words in the subject line), I did not notice this one is for JSF issues only. Sorry. Opened a new bug at https://bugs.eclipse.org/bugs/show_bug.cgi?id=367180 for it.
Ian, I have the error from comment 12 even with JSF 2.0 facet enabled. I´m using WTP 3.3.1. Guess I´ll have to wait for Eclipse Juno, right?
(In reply to comment #20) snip > > Thanks for the extra info. I'm still not seeing the issue, but I think we may > be closing on on why you still are. This was fixed in the HEAD stream (which > will be released as WTP 3.4.0) and back-ported to WTP 3.2.5 (Helios stream). It > is not targeted to be fixed in any 3.3.x (Indigo) stream. > > So, more important than your Eclipse version, what is your WTP version? > > Thanks, > - Ian WTP version is 3.3.x (a mix of 3.3.0 and 3.3.1 components).
I just checked the codelines, and the fix is also in 3.3.2 (not yet released).
Fixed in WTP 3.3.2 and 3.4.
Was also fixed in 3.2.5.
*** Bug 315896 has been marked as a duplicate of this bug. ***
*** Bug 358160 has been marked as a duplicate of this bug. ***
Guys, I have upgraded Indigo to Eclipse Faceted Project Framework Version: 3.3.2.v201201121600-377DH8s735735535DD9 but I still see a warning "EL syntax error: Unexpected symbol '('." on the EL expression: #{acceptButtonBean[acceptButtonMethod](acceptButtonArgument)} Both issues have been reported to GlassFish AND JBoss AS: http://java.net/jira/browse/GLASSFISH-17628 and https://issues.jboss.org/browse/AS7-2825 Both issues are long fixed. Please do so, too. See here for the complete background: http://stackoverflow.com/questions/8004233/jsf-2-how-to-pass-an-action-including-an-argument-to-be-invoked-to-a-facelets-s PLEASE REOPEN!
It'd be more appropriate to check the version of the "Eclipse Java EE Developer Tools" feature; the "Eclipse Faceted Project Framework" feature can always be at a different version than WTP. This is working for me in Indigo SR2 (Eclipse Java EE Developer Tools, v3.3.2.v201111030500-7b7II1YFSK2WIuPRDEnExPV-RvTn). Perhaps you could build a tiny example project, export it to a zip file and attach it here? There must be some aspect of this that I am not understanding or that isn't being stated. I can't promise a fix (if I can actually find an issue) in any particular timeframe, but I would like to try to understand why one of us sees an issue and the other does not. Thanks, - Ian
OK, my version is: Eclipse Java EE Developer Tools 3.3.2.v201111030500-7b7II1YFSK2WIuPRDEnExPV-RvTn org.eclipse.jst.enterprise_ui.feature.feature.group Eclipse Web Tools Platform Below is an example (it doesn't really make sense to compile a project for this). Imagine a data table showing files, their file names, their expiry date and a remove button. Because you need the same remove button (usually with a popup asking you for confirmation) you decide to go for a Facelets sub view, here called remove-button.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:commandButton value="Remove" action="#{removeButtonBean[removeButtonMethod](removeButtonArgument)}" /> </ui:composition> Then you list individual (personal) files and those kept for external companies: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" template="templating/page-layout-2col.xhtml"> <ui:define name="content-right"> <h:form id="idoc-form"> <h:dataTable value="#{repoHome.individualDocuments}" var="doc"> <h:column> #{doc.fileName} </h:column> <h:column> #{doc.expiryDate} </h:column> <h:column> <ui:include src="subviews/remove-button.xhtml"> <ui:param name="removeButtonBean" value="#{repoHome}" /> <ui:param name="removeButtonMethod" value="removeIndividualDocument" /> <ui:param name="removeButtonArgument" value="#{doc.id}" /> </ui:include> </h:column> </h:dataTable> </h:form> <h:form id="edoc-form"> <h:dataTable value="#{repoHome.externalDocuments}" var="doc"> <h:column> #{doc.fileName} </h:column> <h:column> #{doc.expiryDate} </h:column> <h:column> <ui:include src="subviews/remove-button.xhtml"> <ui:param name="removeButtonBean" value="#{repoHome}" /> <ui:param name="removeButtonMethod" value="removeExternalDocument" /> <ui:param name="removeButtonArgument" value="#{doc.id}" /> </ui:include> </h:column> </h:dataTable> </h:form> </ui:define> </ui:composition> This is a relatively simple example that you can likely try in one of your environments. Just change the name of the template and the name of the ui-define. Then you only have to list whatever you have - hopefully you do have such an app. Anyway it should be easy to adapt. The warning appears on the Facelets sub view on the commandButton line, opening parenthesis. Please let me know if that worked.
After much coaxing, I managed to see a generic "Syntax error in EL" warning. I am re-opening, but cannot promise a timeline for a fix.
Thanks for reviewing and reopening this. Staying tuned...
Removed the hotbug tag as the original request was addressed.
I don't know if this is the same problem, but I have the following issue: in my main project, EL expressions with method expressions with string literal parameters produce a warning: "Syntax error in EL". An example: <h:commandButton action="#{bean.doSomething('FOO')}" /> The strange thing is that if I try to reproduce on a small Dynamic Web Project, this warning is not shown. Both my main project and the test case project are dynamic web projects with the following facets: Dynamic Web Module 2.5 (Tomcat 7.0 runtime), Java 1.6, JavaScript 1.0, JavaServer Faces 2.1. Of course, the project setup of the main project is much more complex, but without knowing the internals it's hard for me to guess what's the culprit. Using Kepler SR2 (build id 20140224-0627) and WTP 3.5.2.
This ain't fixed yet. With WTP 3.7.0.v201505072140 (Eclipse 4.5) the following fails: ${aliases[portfolioId.intValue()]} Project facet is Dynamic Web Module 3.0 and Java 1.8.
This bug seems to be still open. Eclipse complains about the method "divide" in this example: <c:if test="${totalExpense <= (project.estimatedExpense.divide(60, 2, 4))}"> Error message: Multiple annotations found at this line: - Encountered " "(" "( "" at line 1, column 49. Was expecting one of: "." ... ... Eclipse doesn't recognize the method call "divide".