Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328402 - [WPE] Tag libraries that don't provide display-label MD will break skinning functionality
Summary: [WPE] Tag libraries that don't provide display-label MD will break skinning f...
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: UI (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Ian Trimble CLA
QA Contact:
URL: ORACLE_P1
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-21 15:40 EDT by Ian Trimble CLA
Modified: 2011-01-21 11:52 EST (History)
2 users (show)

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


Attachments
Returns value of nsURI property if name property is null. (835 bytes, patch)
2010-10-21 17:23 EDT, Ian Trimble CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Trimble CLA 2010-10-21 15:40:40 EDT
If a tag library that's registered to provide skins doesn't provide a display-label (and it's not required to do so), SkinsMenuItemBuilder breaks because it tries to set null as a MenuItem's text property.

The fix is fairly simple: have SkinsMenuItemBuilder.TaglibData.getName() return the value of the nsURI property when the name property is null (the thinking being that it's better to show NSURI and not throw an exception than to just fail miserably).

Manifestation of this condition is visible in the following ways:
1) The dropdown arrow of the skins toolbar button fails and an exception is logged,
2) The WPE context menu shows an empty label for the tag library skin menuitem,
3) The skins preference page shows the NSURI of the taglib instead of a "friendly name"

This condition can occur even if the tag library provides the display-label, when the classpath is not fully initialized at the point in time that this code is called. This scenario requires additional investigation and should have its own bug, since it is not only the skinning funtionality that is affected (e.g. the palette also shows NSURI in the absence of a display-label).
Comment 1 Ian Trimble CLA 2010-10-21 17:23:50 EDT
Created attachment 181450 [details]
Returns value of nsURI property if name property is null.
Comment 2 Raghunathan Srinivasan CLA 2011-01-19 13:54:46 EST
* 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. 
This issue surfaces in multiple places in the WebPageEditor affecting its quality

* Is there a work-around? If so, why do you believe the work-around is
insufficient? 
No workaround

* How has the fix been tested? Is there a test case attached to the bugzilla
record? Has a JUnit Test been added? 
 Manual testing.

* Give a brief technical overview. Who has reviewed this fix? 
See description.

* What is the risk associated with this fix? 
low
Comment 3 Ian Trimble CLA 2011-01-21 11:52:40 EST
Checked in (3.2.3 and 3.3) on 1/20/2011.