Asynchronous JavaScript and XML (asynchronous JavaScript and Xml,ajax) technologies can improve the responsiveness and interactivity of the WEB application user interface. Benefiting from its flexible and pluggable UI component model, JavaServer Faces technology has become the perfect framework for adding AJAX technology to applications. The DOJO JavaScript Toolkit enables component developers to add this functionality more easily. This tutorial describes how to add the power of Ajax to the JavaServer Faces component using the DOJO Toolkit.
What is Ajax? If you've been surfing the web a lot lately, you're probably already experiencing the actual application of Ajax. Ajax helps to improve the speed and applicability of application Web pages, which support updating only parts of the page at once without reloading the entire page after the user initiates the change. With the power of Ajax, your application only needs to exchange a small amount of data with the server without having to go through the process of submitting the form. Ajax technology achieves this through the following technologies:
JavaScript, allowing interaction with browsers and responding to events
DOM, HTML structure for accessing and manipulating pages
XML that represents the data that is transferred between the server and the client.
XMLHttpRequest object that is used to asynchronously exchange XML data between the client and the server.
The following figure shows how these technologies collaborate with each other, using new data from the server to update the page.
Figure 1:ajax General Order of requests
Figure 1 illustrates the general steps of an AJAX request: