Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319549 - The OK button on the Add Filter Mappings Dialog is not enabled properly
Summary: The OK button on the Add Filter Mappings Dialog is not enabled properly
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.servlet (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 08:24 EDT by Carl Anderson CLA
Modified: 2010-07-20 11:22 EDT (History)
1 user (show)

See Also:
david_williams: pmc_approved+
ccc: pmc_approved? (raghunathan.srinivasan)
ccc: pmc_approved? (naci.dai)
deboer: pmc_approved+
ccc: pmc_approved? (neil.hauge)
ccc: pmc_approved? (kaloyan)
cbridgha: review+


Attachments
Update the state of the OK button when Servlet is selected. (877 bytes, patch)
2010-07-12 08:26 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2010-07-12 08:24:42 EDT
Steps to recreate:
1. Create a WEB 3.0 project with no DD
2. Add an annotated servlet
3. Open the New Filter wizard (right click on the project -> New -> Filter )
4. Type in the package and class name, click next
5. In the filter mappings section, click Add to add a new mapping. The Servlet checkbox is selected by default, and the OK button is enabled. 
6. Select the URL Pattern checkbox. The OK button is disabled because the url is empty
7. Select the Servlet checkbox again

Problem:
The OK button remains disabled and will stay disabled until you type something in the URL field. But if you double click on the servlet, the mapping is added despite the OK button being disabled.
Comment 1 Carl Anderson CLA 2010-07-12 08:26:17 EDT
Created attachment 174017 [details]
Update the state of the OK button when Servlet is selected.
Comment 2 Chuck Bridgham CLA 2010-07-12 13:33:30 EDT
approved
Comment 3 Carl Anderson CLA 2010-07-12 13:49:25 EDT
This bug prevents users from returning to the Servlet option of a Filter Mapping- the OK button was enabled when the dialog came up, but it will not re-enable if the user re-selects the Servlet radio button.
The workaround is to type something useless (but valid) in the URL Pattern text field and then select the Servlet radio button.  Alternately, users can press cancel and then bring the dialog back up.  Neither workaround is user-friendly.
Currently, the code only updates the enablement of the OK button when the URL Pattern radio button is selected.  I simply added the same check for enablement when the Servlet radio button is re-selected.  Chuck Bridgham has reviewed this change.
This change was tested by hand.
This is an extremely low risk change, limited to the OK button enablement of a sub-dialog of the Filter wizard.
Comment 4 Carl Anderson CLA 2010-07-13 11:01:57 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3