Implement reusable Ajax components through JSF 2 (1)

Source: Internet
Author: User
Tags glassfish

BKJIA introduced the Ajax support package to readers and used "Ajax to listen to events and errors in the JSF 2 client processing code ". Today, the BKJIA editor recommends that you use the combination of composite components and Ajax to easily support Ajax custom components.

This series of JSFfu series is based on the concept of an introduction to the same name by David Geary. This series will explore JSF2 and its ecosystem in depth and introduce how to integrate Java EE technologies such as Contexts and DependencyInjection with JSF.

In this article, I will show you how to implement the Automatic completion component, which uses Ajax to manage its Completion list. In this process, you will learn how to integrate Ajax into your own composite components.

This series of code is based on JSF2 running in enterprise containers, such as GlassFish or Resin. The last part of this article will detail how to install and run the code in this article using GlassFish.

JSF automatically completes custom components

The AutoComplete field, also known as the recommendation box, is a combination of many Web applications. They are also typical Ajax applications. The Automatic completion field includes many Ajax frameworks, such as Scriptaculous and JQuery. For details about Automatic completion component integration for 1-AjaxDaddy, see references.)-see:


 Figure 1. AjaxDaddy automatically complete Components

This article will discuss how to use JSF to implement automatic completion fields that support Ajax. You will learn how to implement the Automatic completion field shown in 2. A brief virtual country list is displayed, which is selected from the "virtual country list" in Wikipedia. See References ):


 Figure 2. Automatically complete Fields


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.