Link to Remote taglib ver. 1.2


    Custom JSP taglib lets you provide Ajax-based hyperlinks. This tag is similar to our Ajax link and mimics link_to_remote call in Ruby on Rails. Tag asynchronously requests your server side (JSP, servlet) described in href attribute and replaces the given area with the response. For example:
 


<script language="JavaScript" src="cjajax.js"></script>

<%@ taglib uri="taglib.tld" prefix="a" %>

<div id="i1"></div>

<a:LinkToRemote href="/cj/testLink.jsp" title="link" targetId="i1">Click here for update</a:LinkToRemote>

Here hyperlink lets you update the area with DHTML id i1.

In order to use this tag you have to describe an external JavaScript file cjajax.js on your page.

Url used for the server side request could be calculated in some JavaScript function. It is described in the attribute urlFunction. See JavaScript link taglib also.

An attribute targetId lets you provide a CSS/DHTML id for the area that will be updated.

Tags are:

LinkToRemote

Body tag defines Ajax-based hyperlink. Tag's body describes an anchor for the link. Parameters are:

1) href Optional parameter. Describes an URL for your requests.
2) urlFunction Optional parameter. Describes a function that will return an url.
3) targetId Describes a CSS/DHTML id for the updated area.
4) error Optional parameter. Describes a name for your own JavaScript function that will be called in case of errors. By default is empty.
5) beforeAction Optional parameter. Describes a name for your own JavaScript function that will be called at the beginning of request. By default is empty.
6) afterAction Optional parameter. Describes a name for your own JavaScript function that will be called at the end of request. By default is empty.
7) title Optional parameter. Describes a title (tooltip).
8) className Optional parameter. Describes a CSS class.
9) style Optional parameter. Describes a CSS style.
10) rel Optional parameter. Describes a rel attribute.
 

for downloading:

 Library: linktoremotetag.jar     Description: taglib.tld  JavaScript library: cjajax.js

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: