电脑技术学习

JSP Tag Library-AjaxTags 1.0, released

dn001
AjaxTags 1.0, released..

AJAX Tag Library,包含一套JSP 标签,能够让你更简单的在jsp页面中使用Asynchronous JavaScript 和XML (AJAX) 技术。

标签库为比较通用的AJAX功能提供了5个标签:

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

Select/dropdown: based on a selection within a dropdown field, a second select field will be populated

toggle: switches a hidden form field between true and false and at the same time switches an image between two sources

update field: updates one or more form field values based on response to text entered in another field

autocomplete 标签的使用如下:在一个HTML form里,使用一个普通的input field:

<input id="model" name="model" type="text" autocomplete="off" size="30" class="form-autocomplete" />

然后,在jsp页面中,制定使用autocomplete 标签,并引用该input field:

fieldId="model"
popupId="model-popup"
targetId="make"
baseUrl="${contextPath}/autocomplete.view"
paramName="model"
className="autocomplete"
progressStyle="throbbing" />

autocomplete.view 请求将被转发到一个继承自BaseAjaxServlet的servlet, 这个servlet会返还预定格式的数据,这是一项标准的AJAX应用。

官方网站:http://ajaxtags.sourceforge.net/

标签: