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

Summary: Why serialize then property values ?
Product: guibuilder Reporter: maxidea <maxidea>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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).