Tag reference sheet

Tag library reference for the following tag libraries:

AjaxTag Library - version 1.5

AjaxTag Library is a library, which makes AJAX easy to use by JSP.

Namespace definition: xmlns:ajaxtags="http://ajaxtags.sourceforge.net/tags/ajaxtags"

Tags

  • anchors Builds the JavaScript required to rewrite HTML anchor tags with onclick events to enable AJAX capabilities
  • area Builds the JavaScript required to wrap an area on the page with AJAX capabilities
  • autocomplete Builds the JavaScript required to populate an input field as the user types
  • callout Builds the JavaScript required to hook a callout or popup balloon to a link, image, or other HTML element's onclick event
  • displayTag Builds the JavaScript required to wrap a DisplayTag with AJAX capability
  • editor Builds the JavaScript required to create an in-place editor
  • htmlContent Builds the JavaScript required to hook a content area (e
  • portlet Builds the JavaScript required to build a portlet style view
  • select Builds the JavaScript required to populate a select box based on some event
  • submit Builds the JavaScript required to submit form and retrieve response via AJAX
  • tab A Tab which is needed by the Tabpanel and present a site
  • tabPanel This tag builds a panel to display a site as a tab
  • toggle Builds the JavaScript required to toggle an image on/off
  • tree Build a Treeview
  • updateField Builds the JavaScript required to update one or more form fields based on the value of another single field

Required attributes are marked with a*

<ajaxtags:anchors>

Builds the JavaScript required to rewrite HTML anchor tags with onclick events to enable AJAX capabilities.

Can contain:JSP

Attributes

NameDescriptionType
sourceClass The CSS class name of the elements to which the event will be attached. String
target* The target region on the page where the AJAX response will be written, often a DIV tag. String

<ajaxtags:area>

Builds the JavaScript required to wrap an area on the page with AJAX capabilities.

Can contain:JSP

Attributes

NameDescriptionType
ajaxAnchors Whether to rewrite HTML anchor tags with an onclick event. boolean
id* Name of ID used for enclosing DIV tag written by tag. String
sourceClass The CSS class name of the elements to which the event will be attached. String
styleClassCSS class name to use.String

<ajaxtags:autocomplete>

Builds the JavaScript required to populate an input field as the user types.

Can contain:empty

Attributes

NameDescriptionType
afterUpdate Function to execute after user has selected some option and source and target fields were updated with selected values. String
appendSeparator The separator to use for the target field when values are appended. Default: space String
attachTo Name of the JavaScript object to which autocompleter will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes search and returns list of values used in autocomplete dropdown. String
className CSS class name to apply to the popup autocomplete dropdown. Default: autocomplete String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
indicator ID of indicator region that will show during AJAX request call. String
minimumCharacters Minimum number of characters needed before autocomplete is executed. String
parameters A comma-separated list of parameters to pass to the server-side action or servlet. String
parser The response parser to implement. Default: ResponseHtmlParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. Note: this happens before user selects any option. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
source* Text field where label of autocomplete selection will be populated; also the field in which the user types out the search string. String
target* Text field where value of autocomplete selection will be populated; you may set this to the same value as the source field. String
var Name of the JavaScript object created. String

<ajaxtags:callout>

Builds the JavaScript required to hook a callout or popup balloon to a link, image, or other HTML element's onclick event.

Can contain:empty

Attributes

NameDescriptionType
attachTo Name of the JavaScript object to which callout will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes a simple command. String
closeEventTypeEvent that will close the box.String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
openEventTypeEvent that will trigger the callout.String
overlibOptions for OverLib.String
parameters* A comma-separated list of parameters to pass to the server-side action or servlet. String
postFunction Function to execute after Ajax is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
source The ID of the element to which the callout will be attached. String
sourceClass The CSS class name of the elements to which the callout will be attached. String
titleTitle for callout's box header.String
varName of the JavaScript object created.String

<ajaxtags:displayTag>

Builds the JavaScript required to wrap a DisplayTag with AJAX capability.

Can contain:JSP

Attributes

NameDescriptionType
baseUrl URL of server-side page where DisplayTable is created. Useful in a Struts/Tiles environment where several JSPs are combined in a response and you need just the single JSP for the DisplayTable. String
columnClass The CSS class of the TH within the THEAD of the table that should have its HREFs rewritten. If empty, no TH elements will be processed. Default: "sortable". String
id* Name of ID used for enclosing DIV element written by tag. String
pagelinksClass CSS class name of the DisplayTag's navigation links, often named "pagelinks" by default in DisplayTag. If empty, no pagelinks will be processed. Default: "pagelinks". String
parameters A comma-separated list of parameters to pass to the server-side action or servlet. String
postFunction Function to execute after Ajax is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String

<ajaxtags:editor>

Builds the JavaScript required to create an in-place editor.

Can contain:empty

Attributes

NameDescriptionType
baseUrl* URL of server-side action or servlet that will receive the text entered in the editor. String
columns The number of columns the text area should span (works for both single line or multi line). String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
formIdThe formIdString
highlightColorThe highlight color.String
mouseOverText The text shown during mouseover the editable text. String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction A function that will get executed just before the request is sent to the server, should return the parameters to be sent in the URL. Will get two parameters, the entire form and the value of the text control. Default: function(form){Form.serialize(form)} String
rows The number of rows in the input field (anything greater than 1 uses a multiline textarea for input). String
savingText The text shown while the request is sent to the server. String
showAcceptButtonshowAcceptButtonString
showCancelLinkshowCancelLinkString
target*Id of element that will be edited.String

<ajaxtags:htmlContent>

Builds the JavaScript required to hook a content area (e.g., DIV tag) to a link, image, or other HTML element's onclick event

Can contain:empty

Attributes

NameDescriptionType
attachTo Name of the JavaScript object to which htmlContent will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes a simple command. String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
eventType Specifies the event type to attach to the source field(s). String
parameters* A comma-separated list of parameters to pass to the server-side action or servlet. String
postFunction Function to execute after Ajax is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
source The ID of the element to which the event will be attached. String
sourceClass The CSS class name of the elements to which the event will be attached. String
target* ID of DIV tag or other element that will be filled with the response's HTML. String
varName of the JavaScript object created.String

<ajaxtags:portlet>

Builds the JavaScript required to build a portlet style view.

Can contain:empty

Attributes

NameDescriptionType
attachTo Name of the JavaScript object to which portlet will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes a simple command. String
classNamePrefix CSS class name prefix to use for the portlet's 'Box', 'Tools', 'Refresh', 'Toggle', 'Close', 'Title', and 'Content' elements. Default: "portlet" String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
executeOnLoad Indicates whether the portlet's content should be retrieved when the page loads. Default: true boolean
imageCloseImage used for the close icon.String
imageMaximizeImage used for the maximize icon.String
imageMinimizeImage used for the minimize icon.String
imageRefreshImage used for the refresh icon.String
parameters A comma-separated list of parameters to pass to the server-side action or servlet. String
parser The response parser to implement. Default: ResponseHtmlParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
refreshPeriod The time (in seconds) the portlet waits before automatically refreshing its content. If no period is specified, the portlet will not refresh itself automatically, but must be commanded to do so by clicking the refresh image/link (if one is defined). Lastly, the refresh will not occur until after the first time the content is loaded, so if executeOnLoad is set to false, the refresh will not begin until you manually refresh the first time. String
source*The ID of the portlet.String
startMinimizeTo start the Portlet minimized.boolean
title*Title for portlet header.String
varName of the JavaScript object created.String

<ajaxtags:select>

Builds the JavaScript required to populate a select box based on some event

Can contain:empty

Attributes

NameDescriptionType
attachTo Name of the JavaScript object to which select box will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes search and returns list of values used in target select field. String
defaultOptions A comma-separated list of values of options to be marked as selected by default if they exist in the new set of options. String
emptyOptionName The display text for the option when select target is not filled by AJAX response. Default: EMPTY String
emptyOptionValue The value for the option when select target is not filled by AJAX response. Default: EMPTY String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
eventType Specifies the event type to attach to the source field(s). String
executeOnLoad Indicates whether the target select/dropdown should be populated when the object is initialized (this is essentially when the form loads). Default: false boolean
parameters* A comma-separated list of parameters to pass to the server-side action or servlet. String
parser The response parser to implement. Default: ResponseHtmlParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
source* The initial select field that will form the basis for the search via AJAX. String
target* Select field where value of AJAX search will be populated. String
var Name of the JavaScript object created. String

<ajaxtags:submit>

Builds the JavaScript required to submit form and retrieve response via AJAX.

Can contain:empty

Attributes

NameDescriptionType
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
source*ID of form tag to attach to.String
target* ID of DIV tag or other element that will be filled with the response's HTML. String

<ajaxtags:tab>

A Tab which is needed by the Tabpanel and present a site.

Can contain:empty

Attributes

NameDescriptionType
baseUrl* The URL to use for the AJAX action, which will return content for this tab. String
caption*The caption for this tab.String
defaultTab Indicates whether this tab is the initial one loaded (true|false). String
parameters A comma-separated list of parameters to pass to the server-side action or servlet. String

<ajaxtags:tabPanel>

This tag builds a panel to display a site as a tab.

Can contain:JSP

Attributes

NameDescriptionType
contentId The ID of the existing element to be used as tab content. String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
id*The ID of the created tab panel element.String
parser The response parser to implement. Default: ResponseHtmlParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
styleClassCSS class name to add to the tab panel element.String

<ajaxtags:toggle>

Builds the JavaScript required to toggle an image on/off.

Can contain:empty

Attributes

NameDescriptionType
attachTo Name of the JavaScript object to which toggle will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes a simple command from a toggle action; responds with a single option value and label. String
containerClass* CSS style class for the container wrapping the toggle. String
defaultRating* The default rating to use from the 'ratings' list. String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
messageClass CSS style class for the message displayed as you mouseover each toggle image. String
onOff Whether this is a simple on/off (two-value) rating. Default: false String
overClass* CSS style class for the rating that is greater than the selected one. String
parameters A comma-separated list of parameters to pass to the server-side action or servlet. String
parser The response parser to implement. Default: ResponseTextParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
ratings*Comma-delimited list of rating values.String
selectedClass* CSS style class for the rating that's selected. String
selectedLessClass* CSS style class for the rating that is less than the selected one as you mouseover. String
selectedOverClass* CSS style class for the rating that is greater than the selected one as you mouseover. String
source*A unique ID for each toggle tag.String
state* ID of hidden form field used to hold the current state. String
updateFunctionHandle the response from server.String
varName of the JavaScript object created.String

<ajaxtags:tree>

Build a Treeview.

Can contain:empty

Attributes

NameDescriptionType
attachTo Name of the JavaScript object to which tree object will attach. You must define 'var' attribute for this to work. String
baseUrl* The URL to use for the AJAX action, which will return content for this node. String
collapsedClass CSS style class for the node image (collapsed node). String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
expandedClass CSS style class for the node image (expanded node). String
id*The ID of the tree.String
nodeClass CSS style class for the node (does not include the image). String
parameters* A comma-separated list of parameters to pass to the server-side action or servlet. String
parser The response parser to implement. Default: ResponseXmlToHtmlLinkListParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
treeClass CSS style class for the unsorted list. String
varName of the JavaScript object created.String

<ajaxtags:updateField>

Builds the JavaScript required to update one or more form fields based on the value of another single field.

Can contain:empty

Attributes

NameDescriptionType
action* ID of form button or image tag that will fire the onclick event. String
attachTo Name of the JavaScript object to which updateField will attach. You must define 'var' attribute for this to work. String
baseUrl* URL of server-side action or servlet that processes a simple command. String
errorFunction Function to execute if there is a server exception (non-200 HTTP response). String
eventType Specifies the event type to attach to the source field(s). String
parameters A comma-separated list of parameters to pass to the server-side action or servlet. String
parser The response parser to implement Default: ResponseHtmlParser String
postFunction Function to execute after AJAX is finished, allowing for a chain of additional functions to execute. String
preFunction Function to execute before AJAX is started. Should return string "cancel" to cancel AJAX execution. String
source* The form field that will hold the parameter passed to the servlet. String
target* A comma-delimited list of form field IDs that will be populated with results. String
valueUpdateByNameUpdate response values by matching the name.boolean
varName of the JavaScript object created.String