----------------------------------------
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
ldzx
- 粉丝: 1
- 资源: 1
最新资源
- 风光储VSG并网,储能为锂电池 0.6s引入预同步算法,实现稳定并网 工况多,波形好
- 同步磁阻电机SynRM无传感器高频注入HFI+mras驱动matlab离散模型,包含文献,用于学习研究
- 基于粒子群算法的光伏MPPT(可重启PSO) 光伏最大功率追踪算法模型simulink MPPT是基于粒子群算法实现的,同时具备动态追踪能力,当光照改变后会重启粒子群算法进行最大功率追踪
- Comsol等离子体仿真,Ar棒板流注放电 电子密度,电子温度,三维视图,电场强度等
- 储能参与调峰调频联合调度模型(matlab代码) 主要内容为考虑储能同时参与调峰以及调频的联合调度模型,现有文章往往仅关注储能在调峰方面的能力,而实际上同时参与调峰调频将超线性的提高储能的收益,在建模
- Matlab simulink仿真模型搭建(电池相关) 本店可接锂电池或电池包建模搭建 单体电池方面: 1、电池等效电路模型搭建(RC模型) 2、电池特征参数辨识(离线、在线、自适应) 3、电池SOC
- 三相并网逆变器双闭环控制,电网电流外环电容电流内环控制算法,matlab Simulink仿真模型,有源阻尼,单位功率因数,电网电压和电流同相位
- 脉振高频电压注入的永磁同步电机无速度传感器 PMSM
- 三相电压型PWM pwm整流器仿真,双闭环pi PI控制(电压外环电流内环),输出电压600V,单位1运行,变负载实验
- 基于下垂控制的三相全桥PWM逆变器并网仿真模型 基于Matlab Simulink仿真平台 主电路采用三相全桥PWM逆变器 1.仿真均能正常运行,能够准确跟踪对应参考值 2.直流母线电压设置为700V
- 基于扩展反电动势法的PMSM中高速无感控制仿真,对凸极和非凸极电机都适用,模型全部采用离散化的仿真方式,仿照数字控制器真实的特性,有PI+PLL和PI+Luenberger两个版本,龙伯格观测器角度估
- 两极式单相光伏并网仿真 前极:Boost电路+电导增量法 后极:桥式逆变+L型滤波+电压外环电流内环控制 并网电流和电网电压同频同相,单位功率因数并网,谐波失真率0.39%,并网效率高
- 国标GBT34658-2017直流快充27930一致性测试详细报告 对测试用例进行了详细测试,含有通过的BMS快充报文内容 注:同时增加了对测试用例分析和软件兼容性做法
- Comsol等离子体仿真,空气棒板电晕放电 电场强度等
- STM32三相电压型SVPWM整流器仿真,以电压外环和电流内环控制,双闭环PID控制,输出电压600V 三相电压型SVPWM整流器仿真,以电压外环和电流内环控制,双闭环PID控制,输出电压600V
- 电机maxwell Simplorer耦合模型,Maxwell 中建立BLDC电机本体有限元模型,Simplorer中搭建的SVPWM策略下Id=0双闭环控制外电路模型 可成功实现场路耦合联合仿真
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈