Bug 20601 - Easier way to provide attributes to PropertyEditor via PropertyPanel
Easier way to provide attributes to PropertyEditor via PropertyPanel
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Explorer
3.x
PC Linux
: P2 (vote)
: 3.x
Assigned To: Jaroslav Tulach
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-15 15:43 UTC by Jaroslav Tulach
Modified: 2008-12-23 14:34 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
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
Details

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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo