JSP custom taglib for UI development. This taglib lets you create a text input field
(like a normal HTML input tag) with some associated list of predefined values. So
your users will be able not only type a value but also select it from the some list. Tag is similar to
our Custom input taglib but lets you obtain the predefined values
trough the separate call to your server-side. For example:
<script language="JavaScript" src="cjajax.js"></script> <%@ taglib uri="taglib.tld" prefix="ac" %> Product: <ac:acinput name="a" url="getHelp.jsp" listBackground="white"> </ac:acinput> and you will get some like this Tag assumes that your server side returns XML with data for the popup window. E.g.:
<?xml version="1.0" encoding="ISO-8859-1" ?> <ajaxinput> <option>Jdeveloper</option> <option>JBuilder</option> etc. </ajaxinput> Tag will parse the response and fill your popup window with the provided options.
Note: if you are generating XML in JSP file make sure there are no empty lines or white space before the <?xml ... ?> line.
Also in your XML response you can use any name for the root node as well as any names for the nodes. Also you can provide your own CSS styles
for the returned options:
<?xml version="1.0" encoding="ISO-8859-1" ?> <root> <option style="color:green">Jdeveloper</option> <option class="myclass">JBuilder</option> etc. </root> Attributes beforeAction and afterAction lets you provide your own JavaScript code that marks start/end phase of request. For example you can show/hide here some loading image etc. In order to use this tag you have to describe an external JavaScript file cjajax.js on your page. You have to use this tag inside of HTML form (or form taglib from Coldtags suite). Tags are: acinput Body tag mimics HTML input tag and requests the predefined values via Ajax. Parameters are: 1) name Describes a name for your input tag
for downloading: Library: acinputtag.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|