Bug 212927 - "dynamic-attributes" missing from WTP 2.0's JSP tag file support
Summary: "dynamic-attributes" missing from WTP 2.0's JSP tag file support
Status: VERIFIED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: PMC_approved
Keywords: contributed
Depends on:
Blocks: 226089
  Show dependency tree
 
Reported: 2007-12-13 15:20 EST by Phillip DuLion CLA
Modified: 2008-06-10 11:12 EDT (History)
2 users (show)

See Also:
david_williams: pmc_approved+
thatnitind: pmc_approved? (raghunathan.srinivasan)
thatnitind: pmc_approved? (naci.dai)
thatnitind: pmc_approved? (deboer)
thatnitind: pmc_approved? (neil.hauge)
thatnitind: pmc_approved? (kaloyan)
thatnitind: review+


Attachments
Example JSP Tag File (264 bytes, text/plain)
2007-12-13 15:22 EST, Phillip DuLion CLA
no flags Details
Example JSP file that uses custom tag (500 bytes, text/plain)
2007-12-13 15:23 EST, Phillip DuLion CLA
no flags Details
temp in-progress patch (17.24 KB, patch)
2008-04-28 20:53 EDT, Nitin Dahyabhai CLA
no flags Details | Diff
corresponding tests (5.30 KB, patch)
2008-04-28 20:54 EDT, Nitin Dahyabhai CLA
no flags Details | Diff
patch with junits (48.98 KB, patch)
2008-05-13 18:16 EDT, Nick Sandonato CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phillip DuLion CLA 2007-12-13 15:20:54 EST
Build ID: M20071023-1652

Steps To Reproduce:
1. Create a simple tag file in /WEB-INF/tags/xtags
2. Add dynamic-attributes attribute to tag directive:

<jsp:directive.tag body-content="empty" dynamic-attributes="attrs"/>

<%@ tag body-content="empty" dynamic-attributes="attrs" %>

3. Save tag file.  Validator issues "Undefined attribute name (dynamic-attributes)" warning.
Comment 1 Phillip DuLion CLA 2007-12-13 15:22:00 EST
Created attachment 85218 [details]
Example JSP Tag File
Comment 2 Phillip DuLion CLA 2007-12-13 15:23:11 EST
Created attachment 85219 [details]
Example JSP file that uses custom tag
Comment 3 Nitin Dahyabhai CLA 2008-04-28 20:53:36 EDT
Created attachment 97879 [details]
temp in-progress patch
Comment 4 Nitin Dahyabhai CLA 2008-04-28 20:54:37 EDT
Created attachment 97880 [details]
corresponding tests
Comment 5 Nick Sandonato CLA 2008-05-13 18:16:22 EDT
Created attachment 100068 [details]
patch with junits

Patch to include dynamic-attributes along with other JSP 2.0 support. Also added junit tests for version 2.0 JSP content model.
Comment 6 Nitin Dahyabhai CLA 2008-05-21 23:44:10 EDT
Looks great.

* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 
These changes are necessary to correct our JSP 2.0 content model, to ensure that the valid elements are all present and defined correctly.

* Is there a work-around? If so, why do you believe the work-around is insufficient? 
No, this is the only source for this information that we use.  This is one of several cases where the content models are hard-written as classes (to avoid requiring the XSD or DTD components at runtime).

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Tested by myself as well as with the new tests that are included.

* Give a brief technical overview. Who has reviewed this fix? 
The content model for JSP files was split up to represent 1.2 and 2.0 differently in WTP 2.0 (the version used depends on the web facet version), but the 2.0 implementation had oversights and mistakes in it.  Nick's taken the responsibility of doing the tedious work to make sure that the classes implementing the 2.0 data are accurate.

* What is the risk associated with this fix? 
Low, especially for other components.
Comment 7 Nitin Dahyabhai CLA 2008-05-22 12:30:05 EDT
committed
Comment 8 Nick Sandonato CLA 2008-06-10 11:12:05 EDT
Verified in S-3.0RC4-20080610084135.