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 169751 - Custom Property Editor panel does not display the property value of the object
Summary: Custom Property Editor panel does not display the property value of the object
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-03 18:07 UTC by runa
Modified: 2009-08-04 09:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
attached Project (32.29 KB, text/plain)
2009-08-03 18:08 UTC, runa
Details
Attached Java Desktop Application (365.45 KB, application/octet-stream)
2009-08-03 18:10 UTC, runa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description runa 2009-08-03 18:07:44 UTC
Entering this for external customer from the Sun Developer Expert Assistance
program:

Reproducible in Netbeans 6.5

The customer is following the below tutorial:
http://wiki.netbeans.org/NetBeansJavaBeansTutorial
unzip the PersonBean.zip
- Open the PersonBean project in NetBeans
- Clean & Build the project
- Add "PersonBean" to the NetBeans palette via the Palette Manager
- Create a new Java Desktop Application in NetBeans
- Select the Application view (GUI builder design mode)
- Drag & drop the PersonBean from the palette on to the application
- Select the "Address" property from the Property sheet via the ...
- in the custom property editor, enter an address (123 Main Street, San Francisco, CA)
- Save the project
- clean & build
- Exit NetBeans
- Restart NetBeans
- Open the Java Desktop Application
- Select on the instance of the PersonBean
- Notice the "Address" property is not populated with the address entered previously.
- Look at the source "tab", the address property is set correctly in the code but not in the property sheet.
Comment 1 runa 2009-08-03 18:08:20 UTC
Created attachment 85716 [details]
attached Project
Comment 2 runa 2009-08-03 18:10:37 UTC
Created attachment 85717 [details]
Attached Java Desktop Application
Comment 3 Jan Stola 2009-08-04 09:29:20 UTC
Note that the mentioned tutorial is a 'work in progress'. It is incomplete and there are some bugs. For example, 
AddressBeanPropertyEditor and AddressBeanEditorPanel are completely wrong. The PropertyEditor should fire 
PropertyChangeEvents whenever the property value changes. The attached implementation of AddressBeanPropertyEditor 
doesn't fire any changes. It modifies the value in getValue() instead. This is incorrect. AddressBeanEditorPanel should 
listen on changes of its JTextFields, create a new instance of AddressBean for every change and set it to 
AddressBeanPropertyEditor using setValue() (this will generate a corresponding PropertyChangeEvent).