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 21866 - PropertyDialogManager Cancel button should not verify last selected component
Summary: PropertyDialogManager Cancel button should not verify last selected component
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-25 23:17 UTC by Unknown
Modified: 2008-12-23 12:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a proposed patch against orion_fcs (13.19 KB, application/octet-stream)
2002-03-28 10:46 UTC, Jiri Rechtacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2002-03-25 23:17:54 UTC
If you provide a custom property editor and have a component
on the panel that has an input verifier, that input verifier
is still called when the user selects Cancel on the dialog if
that component previously had focus. It shouldn't be called.
I think this line of code should be added around line 170
in PropertyDialogManager.java:

	JButton cancelButton = new JButton(getString("CTL_Cancel"));
        /* Add the next line */
        cancelButton.setVerifyInputWhenFocusTarget (false);
        cancelButton.getAccessibleContext().setAccessibleDescription
              (getString("ACSD_CTL_Cancel"));

I noticed that this is done if the user creates a dialog 
using a DialogDescriptor and the TopManager.createDialog
call, but this call isn't done in the PropertyDialogManager.
Comment 1 Jiri Rechtacek 2002-03-26 14:38:31 UTC
The patch looks good but I don't know a customize dialog with which I
could assure correctly behavior. Could you provide link on any
property editor with described input verifier? Thanks
Comment 2 Unknown 2002-03-27 00:22:04 UTC
To test this:

* Run FFJ, Enterprise Edition. Note that you must
  use the ejb.jar that I sent via email.
* Create an EJB. To do so, right click on package,
  on pop up menu select New->J2EE->Session EJB
* On initial wizard panel, accept defaults and just
  hit "Finish".
* Back in Explorer, you will see 4 nodes appear, 3
  for the java classes created, one representing the
  EJB.
* On the EJB node (display name is "Session (EJB)" ),
  right click and display the pop up menu.
* Select the last entry, "Properties".
* On the Property Dialog, select the "Security Identity"
  property and click on the "..." to display the
  Custom Property Editor.
* On the editor, select the "Run As Specific Security
  Role" radio button. The "Security Role Name" 
  JTextField should get focus.
* Don't type anything in to the text field. Hit cancel.
* Without the code change, the input verifier will run
  and display an error dialog and the custom property
  editor will not go away. You'll have to type something
  in to the role name editor in order to dismiss the
  dialog.
* With the code change suggested in this report, 
  selecting the Cancel button with the Role name
  text field blank dismisses the dialog.
Comment 3 Jiri Rechtacek 2002-03-27 09:47:04 UTC
Thank you for the steps for assure fix reliability. I commited to main
trunk and marked as 3.3.2_CANDIDATE.
Comment 4 Jiri Rechtacek 2002-03-28 10:46:25 UTC
Created attachment 5222 [details]
a proposed patch against orion_fcs
Comment 5 Marian Mirilovic 2002-04-02 10:24:08 UTC
verified in [orion_EE](20020401) && [jdk1.4](fcs),
dialog didn't arise.
Comment 6 Quality Engineering 2003-07-01 16:20:27 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.