Book Image

DWR Java AJAX Applications

By : Sami Salkosuo
Book Image

DWR Java AJAX Applications

By: Sami Salkosuo

Overview of this book

Table of Contents (12 chapters)

Creating Forms


This sample is about forms, form validation, and submission of a form. For this sample, the form we will handle is very simple, just a few fields, and the point of this sample is to show form validation using DWR and form submission using DWR. The form will appear as shown in the following screenshot:

The Name and Address fields are nothing special, except maybe that the address field in real-life is virtually never a simple text field. The Credit card number is validated when it is entered in the input field. The Credit card expiry field is also validated when it is entered.

Developing the User Interface

The first thing to do is to add new menu items to the Dynamic User Interface that we had designed in the previous chapter. This is done by adding properties for menu items to the dwrapplication.properties file. We have already added menu items for the navigation tree and the map scrolling samples that we will develop later in this chapter:

menu.3=Form handling,FormHandling...