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 196311

Summary: false error for struts2 OGNL
Product: javaee Reporter: gaxzero <gaxzero>
Component: JSPAssignee: issues@javaee <issues>
Status: NEW ---    
Severity: normal CC: 372046933, nitin.cool4urchat, pjiricka
Priority: P2    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description gaxzero 2011-03-04 15:53:17 UTC
Product Version = NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Operating System = Mac OS X version 10.5.8 running on x86_64
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307

JSP parser complains about 
<s:select list="#{'' :'-','Mr.': 'Mr.','Mrs.': 'Mrs.','Ms.': 'Ms.','Dr.': 'Dr.'}" 
            name="assocPerson.prefix" label="%{getText('dropdown.namePrefix')}"
            disabled="%{fieldsDisabled}"  id="assocPersonPrefix"/>

from
https://ncisvn.nci.nih.gov/svn/firebird/trunk/software/firebird/web/src/main/webapp/WEB-INF/content/investigator/profile/associations/person/ajax/manage_person_association_fields.jsp
Comment 1 lianhwang 2011-10-17 08:26:45 UTC
Same as id=201944

It is complaining about the ":"
Comment 2 lianhwang 2011-10-17 08:28:00 UTC
*** Bug 201944 has been marked as a duplicate of this bug. ***
Comment 3 Martin Fousek 2013-01-31 08:44:53 UTC
*** Bug 225508 has been marked as a duplicate of this bug. ***
Comment 4 Martin Fousek 2013-01-31 10:42:05 UTC
Sorry that's mistake, this should be definitely improvement because it speaks about support for the OGNL expression language which is not supported now.
Comment 5 johnmorris 2014-01-10 21:21:59 UTC
Until this is fixed, I found a simple workaround to avoid the bogus error in the netbeans editor:

Put a space between # and {

<s:select list="# {'' :'-','Mr.': 'Mr.','Mrs.': 'Mrs.','Ms.': 'Ms.','Dr.': 'Dr.'}" 


OGNL seems to accept this without problems, and the netbeans editor error disappears.  (This is in 7.4)