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 85248 - getJavaInitializationString() is required in PropertyEditorSupport?
Summary: getJavaInitializationString() is required in PropertyEditorSupport?
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: 2006-09-19 15:51 UTC by Masaki Katakai
Modified: 2008-05-29 18:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2006-09-19 15:51:32 UTC
I'm asked about PropertyEditorSupport from community member in Japan.
He is creating a component and using PropertyEditorSupport. But it
generates "???" as argument in readonly area when code is generated.

 jxxxTextField2.setWordCase(???);

It happens on only NetBeans. He is saying that this problem does not
happens on JBuilder. JBuilder can generate the correct argument in it.

After implementing getJavaInitializationString(), it can generate
the correct codes.

I'd like to know:
- Why JBuild is working
- Is this limitation of NetBeans? or bug?

Sample code:
http://www.ts-research.net/netbeans_20060916/
Comment 1 Tomas Pavek 2006-09-19 18:03:29 UTC
According to the specification getJavaInitializationString() is required to be 
implemented. In this case the property is of Integer type. So JBuilder likely 
generates primitive types directly if it does not get the java init string from 
the property editor. We don't do this, but could do as well.

However, you can fix this on your side easily  - implement 
getJavaInitializationString() and let it return the number converted to string. 
Even better would be to return the name of the constant, e.g. WORDCASE_UPPER.
Comment 2 Masaki Katakai 2006-09-20 02:55:46 UTC
Thank you very much for quick evaluation. I'll talk to him about this.
Comment 3 Masaki Katakai 2006-09-20 03:16:13 UTC
Hi tpavek,

Can I ask you one more thing?

> According to the specification getJavaInitializationString() is required to be
implemented

Could you please tell us the exact pointer for this spec? I'm sorry I could
not find it, I checked API docs, but I could not see such description.
Comment 4 Jan Stola 2006-09-20 08:47:39 UTC
The JavaBeans specification can be found on
http://java.sun.com/products/javabeans/docs/spec.html
Look at the section 9.2.6.
Comment 5 Jan Stola 2008-05-29 18:25:42 UTC
Closing.