println(???Catalog Id is not Valid???);
} else {
out.println(???Catalog Id is Valid???);}
Right-click on input.jsp and select Run in JDeveloper 11g to produce
the input form. Specify a Catalog Id field value. An XMLHttpRequest
gets sent to the server and the validationMessage div gets updated
with the response HTML as shown in Fig. 3.6.
3.5 Updating a DOM Element with Ajax.Updater 59
Fig. 3.6 Updating ValidationMessage Div
If a Catalog Id field value is specified that is not valid, the
validationMessage div message gets updated to indicate that the
Catalog Id value is not valid, as shown in Fig. 3.7.
Fig. 3.7 Non Valid Catalog Id
60 3 Less JavaScript with Prototype
3.6 Summary
The prototype library facilitates the development of Ajax applications
with Ajax.Request, Ajax.Updater and
Ajax.PeriodicalUpdater classes, and reduces JavaScript code
with utility functions. In this chapter we added prototype functions and
classes to the Ajax web application that we developed in the previous
chapter to reduce the JavaScript code in the web application.
4 Ajax with Java-GWT
4.1 Introduction
Google Web Toolkit (GWT) is a Java framework for developing Ajax
applications. Ajax being a JavaScript based web technique, GWT
generates the required JavaScript and HTML from the Java classes. GWT
provides a library of dynamic, reusable user interface (UI) components for
UI applications. Only a front-end Java class is required to be specified to
create a GWT application.
Pages:
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73