A preliminary study of Ajax tags tags

Source: Internet
Author: User
The Ajax Ajaxtags project is based on the existing struts HTML tag library, adding AJAX support. Ajaxtags rewrote the Struts tag class Org.apache.struts.taglib.html.FormTag and Org.apache.struts.taglib.html.BaseHandlerTag, and uses Struts's plugin technology , enabling struts to provide support for Ajax. The following are simple examples in a JSP:

Name:

Last Name:




Result:


Note: The Ajaxref property. The contents of the Ajaxref property are defined in Ajax-config.xml, for example, the configuration section of this example is as follows:

! DOCTYPE ajaxconfig Public "Ajaxconfig" "Ajaxconfig"

!--Define A custom request handler that generates XML for example 2-->
Customgeneratexml
Customxmlgenerator.js

!--Configuration for example 1-->



example1.do
Firstname=firstname,lastname=lastname

Example1_resultlayer





The properties of the form are defined in the configuration file, as well as the events that are triggered by the button and how the writeback results are handled. The Ajax invocation of struts is implemented with a clever encapsulation method. Of course ajaxtags is a relatively long distance away from the practical phase, but it provides a feasible solution for efficient development of AJAX applications on existing software architectures.

Related Article

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.