Community
Participate
Working Groups
Steps to reproduce: 1 Create a Web project (2.3 or above) 2 Bring up the New Listener Wizard, and add a new Listener. 3 Remove the Listener from the web.xml, but don't delete the java file 4 Bring up the New Listener Wizard again. The "Use existing Listener class" checkbox (and corresponding section) are always disabled. Note that this really has no effect on Web 3.0 projects, since the Listener is added via annotation, and thus no web.xml entry is created- the listener is just there. However, for Web 2.3, 2.4, and 2.5 projects, this does have an impact. Also, this has been broken since these wizards were reworked for WTP 3.0.
Assigning to Dimitar for initial investigation. Please retarget as you deem appropriate. In NewListenerClassWizardPage.createTopLevelComposite(), it has: existingButton.setEnabled(false); As far as I can tell, there is no way to get this to switch to enabled. I am not sure if this was done intentionally, but it was preserved during the rework for bug 205330 , so I am hesitant to remove it without knowing why this was done, and without a lot of testing to ensure that this composite, once enabled, works properly. (If that checkbox should always be disabled, we should strongly consider hiding/removing this area of the wizard.)
I remember commenting this code for a reason, but I do not remember the reason, so just to be safe will re-target the bug to 3.3
Re-targeting for SR1
Created attachment 197817 [details] Patch to enale the option " Use existing Listener class " Attaching a proposed patch for review.
These changes look good.
PMC REVIEW REQUESTED DUE TO UI CHANGE Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. *In the New Listener Wizard, the user is not able to use an existing class since the checkbox is disabled. Is there a work-around? If so, why do you believe the work-around is insufficient? *There are not work-around in the wizard, the user have to edit manually the web.xml file in order to use an existing class. How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? *It has been tested manually (UI) Give a brief technical overview. Who has reviewed this fix? *This fix enables the checkbox "Use an existing class", and provides a dialog with the classes that implement one of the listener interfaces, the classes are listed and the user can select just one. So, there are some UI changes. What is the risk associated with this fix? *Low since that checkbox was not used.
To be clear, we are seeking PMC approval to put this bug into all of our active development streams - WTP 3.2.5, 3.3.1, and 3.4.0 (which does not require PMC approval, but I listed it to be clear on where this change is going.)
This was a missing functionality in the initial contribution of the Listener wizard. Thanks for adding it. Approved.
Committed to R3_2_maintenance and HEAD for WTP 3.2.5, 3.3.1, and 3.4.0