Back button taglib ver. 1.4

    Custom JSP tags. Tag Back simulates <Back> button in your browser. What is this for? For example, suppose you have to post some data (HTML form) to jsp page (your jsp page is an action parameter for this form). In your jsp code at the first hand you need to validate your data. And if something is not correct (e.g. some mandatory stuff is missed) you need to suggest your user to hit <Back> button and fill all mandatory fields. Sure, it is a standard approach, is not it? Custom tag Back returns the previous page to client's browser. For example:
 


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

<!-- go to the previous page -->
<go:Back />

You may display also some alert:
 


<go:Back alert="Please, type your e-mail address"/>

Custom tag BackLink lets you create a link for this operation. Parameters describe text for hyperlink or image. For example:
 


<go:BackLink text="Previous page"/>

Tags are:

Back

Returns to the previous page (one step back). Parameters are:

1) alert Optional parameter. Describes an alert that will be displayed.
2) cond Optional parameter. Describes a boolean attribute tag's behavior depends on. Default value is true (go back).

BackLink

Creates a link for Back button simulation. Parameters are:

1) text Optional parameter. Describes text for hyperlink. Default value is Back
2) image Optional parameter. Describes image for hyperlink. By default tag will create a text hyperlink.

for downloading:

Library: backtag.jar    Description: taglib.tld

 © Coldbeans Software      Comments?

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

Also in Coldtags: