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 69369 - PropertyEditorSupport not retained by NetBeans
Summary: PropertyEditorSupport not retained by NetBeans
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-26 00:40 UTC by kitfox
Modified: 2005-11-28 16:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
source (2.20 KB, text/plain)
2005-11-26 00:40 UTC, kitfox
Details
source (2.49 KB, text/plain)
2005-11-26 00:41 UTC, kitfox
Details
source (1.20 KB, text/plain)
2005-11-26 00:41 UTC, kitfox
Details
source (1.21 KB, text/plain)
2005-11-26 00:41 UTC, kitfox
Details
source (904 bytes, text/plain)
2005-11-26 00:41 UTC, kitfox
Details
source (5.31 KB, text/plain)
2005-11-26 00:42 UTC, kitfox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kitfox 2005-11-26 00:40:09 UTC
I've created a PropertyEditorSupport derrived class to make it easy for me to
edit the values of URIs in a bean.  However, NetBeans does not seem to be able
to retain the changes I make.

I'm attaching the files I use for my example case.  Basically, I create my
property editor, my bean and a panel to use the bean in.  I add my bean to the
panel, and edit the value in the property inspector.  While this does cause
netbeans to write the generate the correct code in the initComponents() section,
if I press Ctrl-R to reload the form, my changes are lost and the field in the
property inspector coresponding to my property is set to the empty string.

NetBeans seems to generally have poor support for Customizers and
PropertyEditors.  Does NetBeans not support these features, or is this a case of
code drift making previously working features invalid?
Comment 1 kitfox 2005-11-26 00:40:55 UTC
Created attachment 27300 [details]
source
Comment 2 kitfox 2005-11-26 00:41:09 UTC
Created attachment 27301 [details]
source
Comment 3 kitfox 2005-11-26 00:41:23 UTC
Created attachment 27302 [details]
source
Comment 4 kitfox 2005-11-26 00:41:36 UTC
Created attachment 27303 [details]
source
Comment 5 kitfox 2005-11-26 00:41:53 UTC
Created attachment 27304 [details]
source
Comment 6 kitfox 2005-11-26 00:42:06 UTC
Created attachment 27305 [details]
source
Comment 7 Tomas Stupka 2005-11-28 16:57:44 UTC
there seems to be something wrong with the setValue(Object source) method in 
your URIPropertyEditor.

could you, please, replace the line 

uri = (URI)uri;

with 

uri = (URI)source;

in 

public void setValue(Object source)
    {
        uri = (URI)uri;
        firePropertyChange();
    }

and try it again?