----------------------------------------
AJAX JSP TAG LIBRARY RELEASE NOTES
----------------------------------------
1. Overview
2. Requirements
3. Basic Usage
4. History of Changes
5. Licensing
----------------------------------------
1 OVERVIEW
----------------------------------------
The AJAX Tag Library is a set of JSP tags that simplify the use of Asynchronous
JavaScript and XML (AJAX) technology in JavaServer Pages. This tag library
eases development by not forcing J2EE developers to write the necessary
JavaScript to implement an AJAX-capable web form.
The implementation is a combination of Java classes and JavaScript source
files. The Java code should be OS independent as there are no client side
components. However, the Java is dependent on JDK 1.4+ and requires a Servlet
container to run. The JavaScript should run in at least Firefox 1.0+ and
Internet Explorer 5.0+.
A demo application is also available that shows how each JSP tag can be used
in the context of simple use cases such as email address lookup, chained
select field population, and live form updates. It should be easy to see how
these examples could be expanded to a variety of other real-world uses. In
addition, the examples demonstrate simple ways to manage the server-side
callers (i.e, recipients of AJAX calls) in an abstract, reusable way. Note
that the demo application is built to run under Servlet 2.4/JSP 2.0 containers
and has a convenient Ant script to make deploying to Tomcat 5.0+ easy.
FEATURES AND AVAILABLE JSP TAGS
- Autocomplete: Retrieves a list of values that matches the string entered in
a text form field as the user types.
- Callout: Displays a callout or popup balloon, anchored to an HTML element
with an onclick event.
- HTML Content Replace: Builds the JavaScript required to hook a content area
(e.g., DIV tag) to a link, image, or other HTML element's onclick event.
- Portlet: Portlet-style capability from a AJAX-enabled JSP tag.
- Select: Based on a selection within a dropdown field, a second select field
will be populated.
- Tab Panel: Enable an AJAX-based set of property pages.
- Toggle: Uses images to create either a single on/off toggle or a sequential
rating system.
- Update Field: Updates one or more form field values based on response to
text entered in another field.
- Area and Anchor: Shows how to AJAX-enable any area of your page
- Ajax DisplayTag: Shows how to AJAX-enable DisplayTag
For more information, please visit:
Project Page: http://ajaxtags.sourceforge.net/
Downloads: http://www.sourceforge.net/projects/ajaxtags/
Demo/Examples: http://ajaxtags.no-ip.info/
We very much welcome feedback from the community. Our goal is to simplify
development and support the Java community in any way we can. Thank you.
Darren Spurgeon
and the rest of the AJAX Tag Library team
----------------------------------------
2 REQUIREMENTS
----------------------------------------
To use the tag library, you'll need the following:
* JDK 1.4+
* Servlet container running Servlets 2.3+ and JSP 1.0+ (Note: sample application requires
Servlet 2.4 and JSP 2.0)
* Prototype framework 1.4.0: http://prototype.conio.net/
* Scriptaculous library 1.5.1: http://script.aculo.us/
* OverLIBMWS library: http://www.macridesweb.com/oltest/
If you intend to build from the source, you'll need the following:
* Maven 2
* All source dependencies
----------------------------------------
3 BASIC USAGE
----------------------------------------
BASIC REQUIREMENTS (found in distribution)
/ajaxtags-{version}.jar ==> core JSP tag library
/js/ajaxtags-{version}.js ==> core JavaScript
/js/prototype-1.4.0.js ==> Prototype framework JavaScript
/js/scriptaculous.js ==> Scriptaculous library JavaScript
builder.js ...
controls.js ...
dragdrop.js ...
effects.js ...
slider.js ...
/js/overlibmws.js ==> OverLIBMWS library JavaScript
/css/ajaxtags-sample.css ==> modify to suit
/images/close.png ==> sample images for portlet toolbar
minimize.png
maximize.png
refresh.png
/images/stars.gif ==> sample image for toggle
/images/indicator.gif ==> sample image for showing a busy status
/images/throbber.gif ==> sample image for showing a busy status
SET UP ENVIRONMENT
1. Copy the ajaxtags.jar into your WEB-INF/lib directory.
2. Add taglib definition to your application's web.xml file. Not required for JSP 2.0 users.
<taglib>
<uri>http://ajaxtags.org/tags/ajax</uri>
<location>/WEB-INF/ajaxtags.tld</location>
</taglib>
CREATE SERVER-SIDE HANDLER
You must create a servlet of other server-side object to return a result to the client (i.e.,
calling AJAX function). As of AjaxTags 1.2, you may return a response in plain text, HTML, or XML
as long as you've defined an appropriate, corresponding response parser on the client side (i.e.,
JavaScript). We provide default implementations, however, for plain text, HTML, XML and other
variations. Thus, the strict XML format of prior AjaxTags releases is not necessary.
>> XML Response (ResponseXmlParser)
The following is the default XML formatted response accepted by AjaxTags, the same format since
the 1.1 release. There is a helper class to assist in building the XML if you don't want to do it
by hand...see the {{{advanced.html}Advanced Usage section}} for more information. However, as
mentioned above, you're free to implement your own XML parser (via JavaScript) as you see fit.
<?xml version="1.0" encoding="UTF-8"?>
<ajax-response>
<response>
<item>
<name>Record 1</name>
<value>1</value>
</item>
<item>
<name>Record 2</name>
<value>2</value>
</item>
<item>
<name>Record 3</name>
<value>3</value>
</item>
</response>
</ajax-response>
>> Text Response (ResponseTextParser)
This is simply a comma-delimited response.
Record 1,1
Record 2,2
Record 3,3
PREPARE JSP VIEW
Your JSP, of course, is where it all comes together. You must (1) declare the taglib, (2) include a
reference to the JavaScript source, (3) include a reference to any CSS required (of which at least
two tags currently do), (4) add your content (often times a web form), and lastly (5) include the
AJAX tag you want to use.
<%@ taglib uri="http://ajaxtags.org/tags/ajax" prefix="ajax" %>
<html>
<head>
<title>AJAX JSP Tag Library</title>
<script type="text/javascript" src="prototype-1.4.0.js"></script>
<script type="text/javascript" src="scriptaculous.js"></script>
<script type="text/javascript" src="overlibmws.js"></script>
<script type="text/javascript" src="ajaxtags-1.2.js"></script>
<link type="text/css" rel="stylesheet" href="ajax.css" />
</head>
<body>
<form>
Make:
<select id="make" name="make">
<option value="">Select make</option>
<c:forEach items="${makes}" var="make">
<option value="${make}">${make}</option>
</c:forEach>
</select>
Model:
<select id="model" name="model">
<option value="">Select model</option>
</select>
</form>
<ajax:select
baseUrl="${pageContext.request.contextPath}/GetCarModel.view"
source="make"
target="model"
parameters="make={make}" />
</body>
</html>
----------------------------------------
4 HISTORY OF CHANGES
----------------------------------------
1.2-Beta 2 (15-APR-2006)
------------------------------
* Added postFunction to displayTag; SF patch #1373772
* Fixed problem with scripts being stripped; SF bug #1422517
* Fixed problem with not handling multiple parameters; SF bug #1422445
* Fixed problem with autocomplete not replacing parameter values; SF bug #1425496
* Fixed missing evalScripts option; SF bug #1427360
* Autocomplete not addi
没有合适的资源?快使用搜索试试~ 我知道了~
AjaxTags(ajax标签)
共77个文件
java:21个
png:16个
js:10个
需积分: 10 35 下载量 197 浏览量
2008-10-18
19:33:14
上传
评论
收藏 303KB RAR 举报
温馨提示
AjaxTags项目是在现有的Struts HTML标记库的基础上,添加对AJAX支持。 AjaxTags改写了Struts标签类org.apache.struts.taglib.html.FormTag和org.apache.struts.taglib.html.BaseHandlerTag,并使用Struts的plugin技术,使得Struts提供了对AJAX的支持。
资源推荐
资源详情
资源评论
收起资源包目录
AjaxTags.rar (77个子文件)
AjaxTags
ajaxtags-1.2-beta3-src
ajaxtags-1.2-beta3
license.txt 11KB
pom.xml 7KB
src
main
resources
slider.js 11KB
controls.js 27KB
close.png 242B
arrow_down.gif 51B
refresh.png 247B
META-INF
ajaxtags.tld 38KB
minimize.png 225B
ajaxtags-sample.css 4KB
dragdrop.js 21KB
prototype-1.4.0.js 46KB
ajaxtags.js 45KB
overlibmws.js 31KB
arrow.gif 51B
stars.gif 661B
builder.js 3KB
throbber.gif 1KB
Thumbs.db 12KB
effects.js 31KB
scriptaculous.js 2KB
maximize.png 225B
unittest.js 13KB
indicator.gif 2KB
java
org
ajaxtags
tags
AjaxHtmlContentTag.java 7KB
AjaxFormFieldTag.java 7KB
AjaxCalloutTag.java 8KB
AjaxTabPanelTag.java 8KB
AjaxToggleTag.java 12KB
AjaxSelectTag.java 7KB
OptionsBuilder.java 2KB
AjaxDisplayTag.java 8KB
AjaxTabPageTag.java 4KB
AjaxPortletTag.java 12KB
AjaxTreeTag.java 6KB
AjaxAutocompleteTag.java 8KB
AjaxAreaTag.java 5KB
AjaxAnchorsTag.java 3KB
servlets
BaseAjaxAction.java 3KB
BaseAjaxServlet.java 3KB
helpers
AjaxXmlBuilder.java 5KB
Item.java 2KB
AjaxHtmlHelper.java 6KB
AjaxTreeXmlBuilder.java 6KB
TreeItem.java 2KB
assembly
src.xml 432B
bin.xml 2KB
site
apt
advanced.apt 11KB
quickstart.apt 4KB
index.apt 5KB
install.apt 5KB
ajaxlinks.apt 3KB
usage.apt 44KB
screenshots.apt 1KB
migration-1_1-1_2.apt 33KB
migration-1_0-1_1.apt 13KB
xdoc
changes.xml 11KB
resources
release-notes.txt 14KB
images
ajaxtags_htmlcontent1.png 32KB
ajaxtags_select2.png 7KB
ajaxtags_tabpanel.png 4KB
new.gif 57B
ajaxtags_portlet.png 4KB
ajaxtags_form1.png 4KB
ajaxtags_select1.png 3KB
ajaxtags_callout.png 4KB
ajaxtags_toggle2.png 2KB
ajaxtags_form2.png 4KB
Thumbs.db 25KB
ajaxtags_toggle1.png 1KB
ajaxtags_htmlcontent2.png 38KB
ajaxtags_autocomplete.png 3KB
fml
faq.fml 6KB
site.xml 2KB
build.xml 3KB
build.properties 381B
ajaxtags-1.2-beta3.jar 47KB
共 77 条
- 1
资源评论
ldzx
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功