This is a basic demo that illustrates intelligent form processing using ICEfaces and the partial submit mechanism. It is based on entering a USA address, but uses partial submits to analyse and manipulate user input to ensure that a complete valid address is obtained prior to form submission. As you interact with this JSF application, you will find the Direct-to-DOM experience to be enriched in a number of ways. It is important to note that these rich features do not rely on a bunch of JavaScript in the page, but instead leverage the power and resource of the server through ICEfaces.
The first and last name field will autocorrect for capitalization when you tab out of them.
Address, City and State are validated against a server-side address database to ensure they are correct. These validations take place as you tab out of the field, ensuring that you are informed of errors as they happen.
Not only can you run basic validation against individual fields, you can do inter-field analysis for more complex validation. In this demo we analyse City, State, and Zip against the server-side address database to ensure they represent a correct address.
As the form is being completed we can manipulate the form controls to aid the user in entering the form. For instance, if you enter a valid City, the State input text field morphs to a drop-down selection with only States that match the City. If you then select a valid State, the Zip input text field will do the same and present a list of valid Zip codes for that City and State. Likewise, if you enter a Zip first, the City and State will autofill with correct values.
You may have noticed that the Submit button is inactive during form entry. It is not activated for the user until the form is known to be completed fully and contains a valid City, State and Zip for the address. This means that we can drastically reduce form entry errors prior to submission.
Internet Explorer users who use the keyboard to navigate should open menus using (Alt + Down Arrow) keys before navigating the menu with the arrow keys. Then the (Enter) key should be used to select a menu item. When a menu is not open, prior to navigation, Internet Explorer will process the onchange event on the first (Down Arrow) key event. Resulting in the selection of an item the user may not have intended to select.