This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 193228

Summary: [70cat] Wrong error highlighting for EL condition in attribute
Product: javaee Reporter: host <host>
Component: JSF EditorAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic, pjiricka, vriha
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description host 2010-12-10 12:06:44 UTC
An error is shown for the following line (line number 266) in an XHTML file:
<ice:inputText rendered="#{item.dataType == 'TEXT' &amp;&amp; empty item.values}"/>
with the complete value of "rendered" marked as erraneous.

The message is "Encountered "&" at line 1, column 29. Was expecting one of: "}" ... "." ... "[" ... ">" ... "gt" ... "<" ... "lt" ... ">=" ....".
Comment 1 host 2011-02-22 20:00:41 UTC
I have increased the priority and set the target milestone to 7.0 so that this issue gets (hopefully) fixed before 7.0 FCS. I did that because everybody who uses complex EL expressions in JSP or JSF pages will run into this issue.
Comment 2 Marek Fukala 2011-02-28 08:38:22 UTC
Valid issue, the content of the expression needs to be resolved for character references before parsing.
Comment 3 Marek Fukala 2011-03-23 14:48:21 UTC
fixed in web-main#2ee2f2648878

Vlado, please verify the fix thoroughly. The change is non-trivial and may possibly affect almost everyting related to expression language in facelet files. Please try some examples with the xml entity references in the expression and check completion, error checks, hyperlinking, refactoring, find usages etc...

Naturally I've already test all of the above, but I will sleep much better if somebody else verifies the fix as well.

Thanks in advance!
Comment 4 Vladimir Riha 2011-03-23 14:54:05 UTC
Of course, once it'll be in build, I'll try test it
Comment 5 Quality Engineering 2011-03-24 09:47:38 UTC
Integrated into 'main-golden', will be available in build *201103240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2ee2f2648878
User: Marek Fukala <mfukala@netbeans.org>
Log: #193228 - [70cat] Wrong error highlighting for EL condition in attribute
Comment 6 Vladimir Riha 2011-03-24 19:03:30 UTC
So I did some testing, I tried everything that is in TS and a everything that I was able to come up with xml entities. This error seems to be solved, however I have encountered 2 others, not sure how much they are connected.

When I tried to Refactor|Rename java managed bean, an error was thrown, the bug is here #197059 I wasn't able to reproduce it.

The second one is that code folding is missing in html files, jsf pages (.xhtml) and php pages but not in jsp pages. In jsp folding is working. I'll report it as a new bug.
Comment 7 Vladimir Riha 2011-03-24 19:14:27 UTC
folding issue is here: issue #197061
Comment 8 Marek Fukala 2011-03-25 21:25:56 UTC
changeset:   195071:fb9bea27d70c
branch:      release70
user:        Marek Fukala <mfukala@netbeans.org>
date:        Wed Mar 23 15:44:33 2011 +0100
summary:     #193228 - [70cat] Wrong error highlighting for EL condition in attribute