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 20601 - Easier way to provide attributes to PropertyEditor via PropertyPanel
Summary: Easier way to provide attributes to PropertyEditor via PropertyPanel
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jaroslav Tulach
Depends on:
Reported: 2002-02-15 15:43 UTC by Jaroslav Tulach
Modified: 2008-12-23 14:34 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Suggested patch (3.15 KB, patch)
2002-02-20 07:02 UTC, Jaroslav Tulach
Details | Diff
A NPE I got. (2.52 KB, text/plain)
2002-02-20 17:54 UTC, Martin Entlicher

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-02-15 15:43:56 UTC
Currently it is necessary when one wants to provide additional attributes to
ExPropertyEditor to either use Nodes or write beanInfo for own object. Because
this is a common task, this should be simplified as much as possible.

There is a constructor new DefaultPropertyModel (bean, propertyName) right now
that uses beaninfo to find the right PropertyDescriptor. The suggestion is to
add new constructor: new DefaultPropertyModel (bean, featureDescriptor) so one
could use:

PropertyDescriptor pd = new PropertyDescriptor ("myProperty", bean.getClass ());
pd.setPropertyEditorClass (PropertyEditorManager.findEditor (Object.class));
pb.setValue ("superClass", MyProperty.class);
model = new DefaultPropertyModel (bean, pd);
panel = new PropertyPanel (model);

Which is much simpler than writing own bean info.
Comment 1 Jaroslav Tulach 2002-02-20 07:02:43 UTC
Created attachment 4757 [details]
Suggested patch
Comment 2 Jaroslav Tulach 2002-02-20 16:40:19 UTC
Implemented in OpenIDE >= 2.4
Comment 3 Martin Entlicher 2002-02-20 16:49:10 UTC
I'm testing it just now and it seems to work nice :-)
Comment 4 Martin Entlicher 2002-02-20 17:54:45 UTC
Created attachment 4766 [details]
A NPE I got.
Comment 5 Martin Entlicher 2002-02-20 17:55:46 UTC
I got the attached exception. It seems to be related to the change
performed. Thus reopening..
Comment 6 Martin Entlicher 2002-02-20 18:19:45 UTC
Also the property editor sets the selected service immediately. On
cancel it sets it back to the original one, but I think, that this is
not necessary is it?
Comment 8 Quality Engineering 2008-12-23 14:34:08 UTC
This issue had *1 votes* before move to platform component