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 236625 - Error stripe on valid JSP DynamicAttributes
Summary: Error stripe on valid JSP DynamicAttributes
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-02 01:31 UTC by aoindustries
Modified: 2014-01-09 02:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shot of error stripe. (5.40 KB, image/png)
2013-10-02 01:31 UTC, aoindustries
Details
Patch to fix #236635 for my needs. (747 bytes, patch)
2013-10-02 03:09 UTC, aoindustries
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description aoindustries 2013-10-02 01:31:10 UTC
Created attachment 140709 [details]
Screen shot of error stripe.

We are using JSP DynamicAttributes in our custom taglib.  We are passing dynamic attributes that include a period (.):

<ao:include
  page="/path/to/page.jsp"
  arg.title="This is the page title"
  arg.another="This is another argument"
/>

The arg.* attributes are picked-up by the JSP parser correctly, passed as DynamicAttributes, and everything works well.

However, the NetBeans JSP editor puts a red squiggly error strip on the lines starting where the attribute name has a dot.  The real problem is that this makes any JSP EL expression in the attribute entirely red and hard to read/maintain.

I propose that when DynamicAttributes are enabled, the error stripe should be less strict.  It should only high characters that would be invalid in an XML attribute name.  Because these attributes are not mapped to JavaBeans, but rather are DynamicAttributes, this more strict check is inappropriate.

I'll do my best to submit a patch (and get the copy for our developers working).  Any assistance would be greatly appreciated.
Comment 1 aoindustries 2013-10-02 03:09:20 UTC
Created attachment 140710 [details]
Patch to fix #236635 for my needs.

I have attached a patch for this issue.  Perhaps it is not inline with my original request of allowing all valid XML attribute names, but it is enough for our needs and isolates the proper place to make the change.

BTW: Developing NetBeans inside NetBeans is a beautiful thing.  I was able to isolate the relevant line of code in no time flat.

THANK YOU!!
Comment 2 Martin Fousek 2014-01-08 12:10:36 UTC
Good point, thanks a lot for your report.

Fixed in web-main #e40f18e3ab16.
Comment 3 Quality Engineering 2014-01-09 02:56:41 UTC
Integrated into 'main-silver', will be available in build *201401090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e40f18e3ab16
User: Martin Fousek <marfous@netbeans.org>
Log: #236625 - Error stripe on valid JSP DynamicAttributes