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.
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.
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
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.
Thank you for the steps for assure fix reliability. I commited to main trunk and marked as 3.3.2_CANDIDATE.
Created attachment 5222 [details] a proposed patch against orion_fcs
verified in [orion_EE](20020401) && [jdk1.4](fcs), dialog didn't arise.
Resolved for 3.4.x or earlier, no new info since then -> closing.