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 94007

Summary: TabSet: Renderer should not set the "selected" property
Product: obsolete Reporter: bugbridge <bugbridge>
Component: visualwebAssignee: Gregory Murphy <gjmurphy>
Status: RESOLVED WONTFIX    
Severity: blocker CC: gjmurphy, lfitzgerald
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description bugbridge 2007-02-02 17:37:23 UTC
Original submitter: gjmurphy

Description:
When you attempt to unset the value of the "selected" property, it is set to
null. As a result of this property value change, a re-rerendering of the tabset
component is triggered. The tabset renderer, upon discovering that no tab is
selected, chooses a default tab (the first one). It then sets the selected
property on the tabset component to the id of the newly chosen tab!

At this point, there is very bad juju. The component thinks the selected
property has value "tab1". But the DesignBean wrapping the component thinks the
selected property has value "null" (which is why the "tab1" value is not
persisted in the JSP).

Shortly after rendering, a repaint of the NB property sheet is triggered, and
insync attempts to get the value of the selected property. To do this, it uses
reflection to invoke the instance getter for the "selected" design property.
This gets the instance value, not the DesignBean value. That's why  in the
property sheet you see "tab1", and that's why you can't make it go away.

Evaluation:
The renderer should not set the selected property as a way of saving information.
Comment 1 Lark Fitzgerald 2007-06-12 20:46:34 UTC
The J2EE 1.4 Sun Web UI Component library based on JSF 1.1 is now under maintenance mode. Only P1/P2 bugs reported on 
these components will be addressed. All current development efforts are being focused on Java EE 5 Project Woodstock 
component library based on JSF 1.2.

Note: this issue has been fixed in project woodstock.