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

Bug 325496

Summary: [JSF2.0] False warning from facelet validator for the attribute value #{resource['lib:file']}
Product: [WebTools] Java Server Faces Reporter: Xiaonan Jiang <xiaonan_jiang>
Component: JSF ToolsAssignee: Ian Trimble <ian.trimble>
Status: RESOLVED FIXED QA Contact: Cameron Bateman <cameron.bateman>
Severity: normal    
Priority: P3 CC: agueda, gloriay, raghunathan.srinivasan, yurykats
Version: unspecified   
Target Milestone: 3.4.0 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
fix none

Description Xiaonan Jiang CLA 2010-09-16 12:52:33 EDT
Build Identifier: M-3.2.1-20100623085141

JSF 2.0 introduced a new syntax for the resource. Looks like the facelet validator does not handle this.

Reproducible: Always

Steps to Reproduce:
1. Create a jsf 2.0 project
2. Create a folder "WebContent/resources"
3. Create another folder "WebContent/resources/lib"
4. Copy an image file under the above folder
5. Create a facelet page and add the following tag:
   <h:graphicImage value=”#{resource[‘lib:test.gif’]}”/>
6. Save the page and will see a false warning: "invalid value".
Comment 1 Xiaonan Jiang CLA 2010-09-17 09:57:19 EDT
The false warning is "Syntax error in EL" (not "invalid value") from the facelet validator. It will disappear if removing the "." in the file name.
Comment 2 Xiaonan Jiang CLA 2010-09-20 10:08:08 EDT
Created attachment 179245 [details]
fix

The '.' inside the two \' chars should be considered as a part of a string instead of as an operator.
Comment 3 Yury Kats CLA 2010-12-01 13:44:29 EST
Is anything preventing the patch from being applied to 3.2.3? Any other assistance we can offer to help resolve this bug?
Comment 4 Raghunathan Srinivasan CLA 2010-12-01 14:25:02 EST
Mass update: The JSF Tools team is currently focused on performance and deadlock issues in the product. We plan to address other WTP bugs later this month and will review and checkin the patches soon. Thanks for your contribution and understanding.
-Raghu
Comment 5 Ian Trimble CLA 2011-01-04 19:30:29 EST
The patch does not appear to work as advertised - the new code in the patch is never reached when following the repro steps.
Comment 6 Raghunathan Srinivasan CLA 2011-01-19 19:43:28 EST
No response to comment 5. Moving this to 3.3 as we are in the ramp down for 3.2.3
Comment 7 Raghunathan Srinivasan CLA 2011-05-26 14:17:11 EDT
Mass Triage: Deferred from Indigo
Comment 8 Raghunathan Srinivasan CLA 2011-05-26 14:19:22 EDT
Changing the Target Milestone to future
Comment 9 agueda martinez CLA 2012-01-03 17:37:21 EST
(In reply to comment #8)
> Changing the Target Milestone to future

We would still like to get a fix for this problem soon, any chance for reconsidering the target?
Comment 10 Ian Trimble CLA 2012-01-09 19:51:50 EST
Fix committed to HEAD at 2012/01/09 04:50PM PST.

(Note: we aren't yet fully supporting resource references in JSF Tools, but this fixes the issue as logged - no more false warnings about the EL syntax for resource references being incorrect in JSF 2.0 or greater.)
Comment 11 agueda martinez CLA 2012-01-10 09:36:25 EST
(In reply to comment #10)
> Fix committed to HEAD at 2012/01/09 04:50PM PST.
> 
> (Note: we aren't yet fully supporting resource references in JSF Tools, but
> this fixes the issue as logged - no more false warnings about the EL syntax for
> resource references being incorrect in JSF 2.0 or greater.)

Thank you Ian ! :-)
Comment 12 agueda martinez CLA 2012-03-13 11:47:31 EDT
Hello can we get this fix in 3.2.5 p please?
Comment 13 Raghunathan Srinivasan CLA 2012-03-13 19:54:50 EDT
(In reply to comment #12)
> Hello can we get this fix in 3.2.5 p please?

Please open a hot-bug request for 3.2.5 P. You may follow the process in this
bug 333666#c5 . Please indicate a date by which you need this patch.
Comment 14 Gloria Yadira Torrealba Melendez CLA 2012-03-16 13:31:37 EDT
Hot bug request opened Bug 374535