Java: Include AJAX functionality in custom JavaServer faces components

Source: Internet
Author: User
Tags dojo toolkit

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.