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 225921

Summary: Accept xml "&&" as "&&" in EL expressions in JSF xhtml files.
Product: javaee Reporter: nimarukan <nimarukan>
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P4    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description nimarukan 2013-02-08 22:42:57 UTC
Netbeans version 7.3rc2

JSF .xhtml files are xml files and may contain entities such as "&amp;" for the ampersand character "&" in EL (Expression Language) expressions.

An "&&" token may cause errors in xml proccessing, so "&amp;&amp;" is used.
("and" could also be used).
http://www.w3.org/TR/2008/REC-xml-20081126/#syntax

Currently NetBeans erroneously flags "&amp;&amp;" as an EL syntax error.

  Encountered "&" at line 1 column 21.
  Was expecting one of
     ...
     "&&" ...
     "and" ...
     ...

<h:panelGroup rendered="#{row.size != 0 &amp;&amp; row.name != null}" ...

It should not be an error.  (NB could suggest replacing "&amp;&amp;" with "and", but should not count this as an error.)
Comment 1 ptomasek 2013-04-23 14:43:30 UTC
This also applies to javascript editor errors:

Expected an operand but found &
Comment 2 Martin Fousek 2014-02-14 07:25:21 UTC
This was fixed pretty long time ago, feel free to check it in our beta build or wait for the nb80 release. Closing as worksforme.