Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326028

Summary: [validation][translation] Validation messages reported for JSP EL within JavaScript event handler
Product: [WebTools] JSDT Reporter: KrasiG <krasig>
Component: WebAssignee: Project Inbox <jsdt.web-inbox>
Status: NEW --- QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3 CC: cmjaun, linzuxiong1988, manderse, thatnitind
Version: unspecified   
Target Milestone: Future   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard:

Description KrasiG CLA 2010-09-23 05:43:24 EDT
Build Identifier: 20100617-1415

I have JSF application.
In page i have expressions like:

I have this expression:

......onclick="if(! confirm('#{labels['general.confirmDelete']}')) return false;">.....

 

And validation give me next errors:
Syntax error on token ")", ; expected   
Syntax error on token "confirmDelete", ( expected after this token   
Syntax error, insert ") BlockStatement" to complete ProgramElements   
Syntax error, insert ") BlockStatement" to complete ProgramElements   
Syntax error, insert ")" to complete MethodInvocation    

For me expression is correct

JS validator doesn't work properly if there is any EL in JS constructions


Reproducible: Always
Comment 1 Lin ZuXiong CLA 2012-02-06 00:30:35 EST
One way to ignore the annoying errors is that :
1.remove javascript -> validator -> errors/warning.
2.remove project -> .project file -> javascript command
3.It is important,too! delete js file and import again.