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 80113 - Why serialize then property values ?
Summary: Why serialize then property values ?
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@guibuilder
Depends on:
Reported: 2006-07-13 07:20 UTC by maxidea
Modified: 2008-04-28 11:36 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description maxidea 2006-07-13 07:20:01 UTC
I'm trying to make some JavaBean but every time i change a custom property I'm 
unable to reopen then form where I use it.
I take a look at you .form file, every time I save me custom property is 
serialized in this XML file. Serialization is a good thing but not for a 
changing object, ok i can define a SerialVersionID and use the Externalize 
interface but is really necessary ?
Every custom property return the Java code to recreate it, you use it in the 
source code, then why not use this value ?
It's possible to create a stupid class like this ...

class StupidPropertyValue implements PropertyValue {
  public <CustomPropertyClass> getPropertyValue() {
    return <code returned by method getJavaInitializationString>;
compile it and save the byte code, when you load the .form file you can 
instantiate it and take the value from it casting to PropertyValue interface 
for example.

tanks !
Comment 1 maxidea 2006-07-13 07:25:08 UTC
OK I make a mistake ... It's not possibile to make a interface where the 
method return type change every time ... 

ok remove interface and whith reflection use the only method in this class ... 
is much simple.

Comment 2 Tomas Pavek 2006-07-26 13:52:35 UTC
This is a bit wild idea, but interesting... Looks like it might work ;) We'll
try it.

Howewer we still need to support some standard and reliable persistence of
properties (see issue 73138).