Details
Description
I have a simple ICEFaces application running on JBOSS 4.2.2 GA using its supplied JSF 1.2 implementation. The app has a single JSPX - a login page. This page has the following:
1. <ice:form partialSubmit="true"
2. <ice:inputText for User Name
3. <ice:inputText for Password
4. <ice:commandButton with action set to loginBean.doLogin
5. <ice:messages globalOnly="true"
The application has System.out.println statements at:
1. The 'afterPhase' and 'beforePhase' methods on a PhaseListener
2. The beginning of the 'doLogin' method, and the beginning of each validation method.
The loginBean method 'doLogin' performs validations, and if any problems are found, a global FacesMessage is added to the FacesContext, and 'null' is returned.
The following validations are performed:
1. Both User Name and Password are required
2. User Name must be 4-20 characters in length
3. Password must be 4-12 characters in length
4. The User Name must = rmoyers, and the Password must = letmein
Note: none of these validations are being done with the validation framework - they are all 'application' level validations. The reason I chose to do this could be another issue, but I can live with not using the validation framework.
Here is the scenario which leads to the problem:
1. Start the app, and enter just 'b' in User Name. Do not tab out of User Name. Leave Password blank. Use the mouse to Click the Login button.
2. The 'doLogin' method is correctly fired, and it correctly adds two messages (User Name too short, and Password required).
3. The form is correctly rendered with the two messages.
4. Add the letter 'o' to the end of the User Name, making it 'bo'. Do NOT tab out of User Name, and use the mouse to Click the Login button.
5. The 'doLogin' method DOES NOT fire. Messages on the console show that all 6 JSF lifecycle phases are invoked.
6. Press the Login button again, and the 'doLogin' method DOES fire. The net effect is that the user must click the Login button TWICE. This is 100% reproducable.
Here are some things that make it work correctly:
1. In step 4, if you tab out of the User Name (after adding the letter 'o'), then click the Login button, everything works as expected.
2. In step 4, if you navigate away from the browser (after adding the letter 'o'), then navigate back, then click the Login button, everything works as expected.
3. With <ice:form partialSubmit="false", everything works correctly.
The same behavior exists in both 1.6.2 and 1.7.0. I can get the simple project to you if you give me instructions on how to do it.
1. <ice:form partialSubmit="true"
2. <ice:inputText for User Name
3. <ice:inputText for Password
4. <ice:commandButton with action set to loginBean.doLogin
5. <ice:messages globalOnly="true"
The application has System.out.println statements at:
1. The 'afterPhase' and 'beforePhase' methods on a PhaseListener
2. The beginning of the 'doLogin' method, and the beginning of each validation method.
The loginBean method 'doLogin' performs validations, and if any problems are found, a global FacesMessage is added to the FacesContext, and 'null' is returned.
The following validations are performed:
1. Both User Name and Password are required
2. User Name must be 4-20 characters in length
3. Password must be 4-12 characters in length
4. The User Name must = rmoyers, and the Password must = letmein
Note: none of these validations are being done with the validation framework - they are all 'application' level validations. The reason I chose to do this could be another issue, but I can live with not using the validation framework.
Here is the scenario which leads to the problem:
1. Start the app, and enter just 'b' in User Name. Do not tab out of User Name. Leave Password blank. Use the mouse to Click the Login button.
2. The 'doLogin' method is correctly fired, and it correctly adds two messages (User Name too short, and Password required).
3. The form is correctly rendered with the two messages.
4. Add the letter 'o' to the end of the User Name, making it 'bo'. Do NOT tab out of User Name, and use the mouse to Click the Login button.
5. The 'doLogin' method DOES NOT fire. Messages on the console show that all 6 JSF lifecycle phases are invoked.
6. Press the Login button again, and the 'doLogin' method DOES fire. The net effect is that the user must click the Login button TWICE. This is 100% reproducable.
Here are some things that make it work correctly:
1. In step 4, if you tab out of the User Name (after adding the letter 'o'), then click the Login button, everything works as expected.
2. In step 4, if you navigate away from the browser (after adding the letter 'o'), then navigate back, then click the Login button, everything works as expected.
3. With <ice:form partialSubmit="false", everything works correctly.
The same behavior exists in both 1.6.2 and 1.7.0. I can get the simple project to you if you give me instructions on how to do it.
Issue Links
- duplicates
-
ICE-4308 "blockUIOnSubmit=true" stops button press from firing Action event
- Closed
Activity
Robert Moyers
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 1.8.2 [ 10190 ] |
Ken Fyten
made changes -
Assignee | Adnan Durrani [ adnan.durrani ] |
Adnan Durrani
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Adnan Durrani
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Cannot Reproduce [ 5 ] |
Ken Fyten
made changes -
Resolution | Cannot Reproduce [ 5 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Assignee | Adnan Durrani [ adnan.durrani ] |
Ken Fyten
made changes -
Status | Reopened [ 4 ] | Closed [ 6 ] |
Resolution | Duplicate [ 3 ] |
Hi, can you attach the project to the JIRA as a .zip archive?