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 1289 - Component.name property could be defaulted in the Form Editor
Summary: Component.name property could be defaulted in the Form Editor
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 enhancement (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 90024 (view as bug list)
Depends on:
Blocks:
 
Reported: 1999-03-03 17:52 UTC by Jesse Glick
Modified: 2007-12-12 23:50 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
nameproperty.txt - StarTeam (881 bytes, text/plain)
2000-07-27 07:54 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 1999-03-03 17:52:16 UTC
See attachment.
Comment 1 _ ttran 2000-07-26 08:56:59 UTC
see no attachment
Comment 2 Jesse Glick 2000-07-26 17:00:59 UTC
Hmm, looks like the attachment got lost during Bugzilla conversion. Let me try
to remember:

I think the user pointed out that there is a standard "name" property for Swing
(AWT?) components which does nothing by itself but which can be used for things
like scripting-language manipulation of visual elements, finding components by
name later, etc. I think he suggested that there be some way to have this
property be defaulted in the Form Editor, probably to the variable name
representing the bean.
Comment 3 _ ttran 2000-07-26 17:19:59 UTC
having the component's name set to something other than null sometimes
can be useful, but definitely not by default.  Most of people don't
want an extra comp.setName("xxx") in their code.
Comment 4 Marek Grummich 2000-07-27 07:54:59 UTC
Created attachment 58 [details]
nameproperty.txt - StarTeam
Comment 5 Marian Mirilovic 2001-01-18 09:00:59 UTC
*** Bug 9132 has been marked as a duplicate of this bug. ***
Comment 6 Jan Chalupa 2001-05-05 22:16:50 UTC
Target milestone -> 3.3
Comment 7 Jan Chalupa 2001-11-27 12:38:17 UTC
Target milestone -> 3.3.1.
Comment 8 Marek Grummich 2002-07-22 09:57:16 UTC
Set target milestone to TBD
Comment 9 Marek Grummich 2002-07-22 10:00:33 UTC
Set target milestone to TBD
Comment 10 Jesse Glick 2003-08-18 13:33:36 UTC
This has been ignored for a few years so bumping up the priority a
little bit. :-)

Martin B. - note that if this had been implemented several years ago
and used when creating GUI forms for the IDE, we would probably have
the name set for most components already, which could be helpful to QA
when creating GUI tests.
Comment 11 Tomas Pavek 2003-08-18 13:42:04 UTC
The biggest problem with this is as Trung already mentioned:

> having the component's name set to something other than null
> sometimes can be useful, but definitely not by default.
> Most of people don't want an extra comp.setName("xxx") in
> their code.

This would have to be done as an option which could be turned on
additionally. But should be simpler to do than e.g. the mnemonics
support in issue 27009.
Comment 12 Jesse Glick 2003-08-18 14:13:48 UTC
Agreed that it is probably best as an option, off by default. When on,
Component.name would be defaulted from the variable name of the component.

Option might need to be per-form rather than global, to avoid
rewriting guarded blocks of existing forms when they are opened; or it
could be a global option and take effect by literally setting the
'name' property in the form whenever a new component is created or the
variable name is changed (and storing the 'name' property redundantly
in the .form file).
Comment 13 Tomas Pavek 2005-05-16 18:54:45 UTC
Still not sure about this (after 6 years!). I guess we need the per-form setting
(which is possible as of NB 4.1). The redundant property value would be hard to
keep in sync. With the form setting it would be also possible to turn this
off/on for whole forms easily.
Comment 14 Jan Stola 2007-01-08 09:19:39 UTC
*** Issue 90024 has been marked as a duplicate of this issue. ***
Comment 15 Tomas Pavek 2007-08-07 13:02:40 UTC
This was done recently with resources support for Swing Application Framework. Now there is a form-level setting
(property) called "Set Component Names" available on root form node which if turned on will set the name property for
each component and keep it in sync with the variable name. There's also a global setting (in Options) which determines
the default value of the form-level for newly created forms.

In the default setup, new forms created as part of app framework project will have the component naming turned on, forms
in standard Java SE or NBM projects will have it turned off.
Comment 16 _ tboudreau 2007-08-07 18:51:30 UTC
Wow, opened in March 1999, fixed in August 2007 :-)
Comment 17 Jesse Glick 2007-12-12 20:00:28 UTC
I see the form property, but I'm not seeing the global option - where is it? I go to Tools > Options > Miscellaneous >
GUI Builder and there does not appear to be anything related to setting component names.
Comment 18 Michel Graciano 2007-12-12 23:50:06 UTC
Hi,
the property is available into Tools > Option > Advanced Options > GUI Builder > Set Components Names.

Cheers.