Wednesday, May 04, 2005

Asynchronous JavaScript and XML (AJAX) with Java 2 Enterprise Edition

AJAX uses JavaScript in an HTML page to make asynchronous calls to the server from which the page loaded and fetch an XML document from a server-side component asynchronously. Upon completion of a request JavaScript may update or modify the Document Object Model (DOM) of the HTML page based on the resulting XML document. Only the affected portions of the HTML DOM are are re-rendered in the HTML page. The term Asynchronous JavaScript and XML has emerged recently to describe this interaction model.

For a detailed explanation of AJAX, please see Using AJAX with the J2EE platform. If you are new to AJAX, we recommend that you read that document before reading the following solutions.

Note that AJAX is an emerging technology, and hence the solutions presented here are likely to change as best practices emerge.

This category presents some solutions for using AJAX when developing Web applications with the J2EE platform:

  • Auto-Complete: Provide a simplifed means of data navigation as the user enters a request in an HTML form.
  • Progress Bar: Track the progress on the client of a server-side operation without refreshing the HTML page.
  • Realtime Form Validation: Perform server-side validation of form data in an HTML page without refreshes.
  • Refreshing Data: Provide up to date data to the an HTML page.

No comments: