Custom JSP taglib you can use with HTML input controls. Tag setChecked depends on the given condition prints the keyword CHECKED or outputs nothing. Tag setSelected does the same with the keyword SELECTED. Tag setText lets you output on the similar manner user-defined messages. For example:
<%@ taglib uri="taglib.tld" prefix="s" %> <input type="radio" name="selection" value="first" <s:setChecked cond="<%=request.getParameter(\"first\")!=null%>"/> > Tags are: setChecked Tag outputs CHECKED keyword depends on the given condition. Parameters are: 1) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true. setSelected Tag outputs SELECTED keyword depends on the given condition. Parameters are: 1) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true. setDisabled Tag outputs DISABLED keyword depends on the given condition. Parameters are: 1) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true. setReadonly Tag outputs READONLY keyword depends on the given condition. Parameters are: 1) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true. setText Body tag prints own body if the given condition is true. Otherwise tag prints a string described by parameter default. Parameters are: 1) cond Optional attribute. Describes a boolean value tag's
behavior depends on. Default value is true.
for downloading: Library: settag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|