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 155342

Summary: "Create Java DB Database" dialog uses a textfield for a readonly value
Product: db Reporter: Roman Mostyka <romanmostyka>
Component: DerbyAssignee: John Baker <jbaker>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 152765    

Description Roman Mostyka 2008-12-12 13:45:01 UTC
1. Start IDE.
2. Rightclick "Java DB" node and choose "Create Database...".
3. Select "Database Location" field and try to change location.

Result: The "Database Location" field look like editable, but user can edit it only by clicking "Properties" button and
then change location in "Java DB Properties" dialog. This field shouldn't look like editable or it should be possible to
edit location in "Create Java DB Database" dialog.
Comment 1 John Baker 2008-12-12 18:19:52 UTC
the location is not intended to be edited.

Note, this is the way the dialog was originally designed.
Comment 2 John Baker 2008-12-12 18:28:43 UTC
To edit the location, use Java DB Properties.  Also it wouldn't make sense to allow editing in 2 places
Comment 3 David Vancouvering 2008-12-12 18:38:48 UTC
I think Roman's point was that it shouldn't *look* editable if it's not.  Make it a label instead of a text field, for
example.
Comment 4 John Baker 2008-12-15 22:13:29 UTC
Even though a textfield appears, no cursor can be displayed.  That's not the issue.  A textfield just shouldn't be used
for a non-editable field.

But, the real problem is the following:

Since a textfield is used and the textfield is readonly, if a long path is specified for the database location then
the path is truncated - the beginning of the path is scrolled to the beginning and is not visible.

If a label is used instead for the path then the dialog will expand to fit the full path
Comment 5 John Baker 2008-12-15 22:27:47 UTC
Instead of allowing the dialog to resize to show the database location, I will add a tooltip to the location label
Comment 6 John Baker 2008-12-15 22:39:18 UTC
003af378da67
Comment 7 David Vancouvering 2008-12-15 23:53:23 UTC
This seems OK, but if I were a user I would like to be able to change the database location from this dialog.  But that's a separate enhancement...

Comment 8 David Vancouvering 2008-12-15 23:53:27 UTC
This seems OK, but if I were a user I would like to be able to change the database location from this dialog.  But that's a separate enhancement...

Comment 9 John Baker 2008-12-16 00:08:06 UTC
If you click the Properties button in the Create Database dialog, the the database location can be updated.
Comment 10 Roman Mostyka 2008-12-16 17:38:43 UTC
Verified with build 081216.
Comment 11 Quality Engineering 2008-12-18 06:37:19 UTC
Integrated into 'main-golden', will be available in build *200812180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/003af378da67
User: John Baker <jbaker@netbeans.org>
Log: #155342 use label instead of textfield for read-only value and add tooltip