Icon link taglib ver. 1.2

    Custom JSP tag. Renders a HTML hyperlink (<a> tag) to the specified URL. Tag supports sessions, so URL rewriting will be added automatically. You may use this tag as a standard replacement for HTML <a> tag in your JSP pages. This tag also adds automatically a standard icon after the hyperlink depends on the link (external link, popup) or the file type your link points to. For example:
 


<%@ taglib uri="taglib.tld" prefix="go" %>
<html>
...
<go:iconlink href="http://www.server.com/nextpage.mp3"/>
<go:iconlink href="http://www.server.com/prevpage.htm" target="_blank">Link</go:iconlink>
...
</html>

and you will get some like this:

http://www.server.com/nextpage.mp3
Link

You can set a text for your hyperlink as a tag's body or through the parameter text or through the special tag setText. Tag setParameter lets you define a GET parameter for the link (value will be encoded automatically):
 


<%@ taglib uri="taglib.tld" prefix="go" %>
<html>
...
<go:iconlink href="http://www.server.com/nextpage.htm">
 <go:setText>Next page</go:setText>
 <go:setParameter name="A">value for A</go:setParameter>
 <go:setParameter name="B">value for B</go:setParameter>
</go:iconlink>
...
</html>

Tags are:

link

Body tag renders HTML (WML) hyperlink. Parameters are:

1) href Optional parameter. Describes an URL. By default tag will use the current URL (request URI).
2) target Optional parameter. Describes a target frame.
3) title Optional parameter. Describes a title (tooltip).
4) rel Optional parameter. Describes a rel attribute.
5) className Optional parameter. Describes a CSS class.
6) style Optional parameter. Describes a CSS style.
7) unique Optional parameter. Possible values are true or false. If this value is true tag adds unique parameter to link that makes it non-cached. Default value is false (do not add).
8) text Optional parameter. Describes a text for hyperlink. By default tag will use the value of href parameter as a text.
9) onClick Optional parameter. Describes a JavaScript code for 'onclick' event.
10) prefix Optional parameter. Describes a part of URL that will be added to the local (not started with http://) links. By default is empty.

setText

Body tag defines a text for hyperlink. Parameters are: none

setParameter

Body tag defines a parameter for hyperlink. Parameters are:

1) name Describes a name for your parameter

for downloading:

Library: ilinktag.jar    Description: taglib.tld

icons: Word files Excel files PDF files Mailto: links External links Popups

 © Coldbeans      Comments?

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

Also in Coldtags: