The Common-Controls Tag Library

<base:ajax>

Sets the AJAX properties for several controls on a jsp page or for the complete page.

If the <ajax>-Tag is specified without a tag body (empty element) at the beginning of the page then it will specify the AJAX properties for all controls on the page.

If the AJAX properties only should be set for some controls then the controls should be embedded within the <ajax>-Tag. For example this is usefully if you do not want to set the property for each column within a listcontrol. Alternative the listcontrol can be embedded within an <ajax>-Tag. If the attribute is also set on the control it will overwrite the general settings.

The <ajax>-Tag can be used multiple times within a page.


Body content: JSP
Tag class: AjaxTag
 

[ Syntax ]

Standard Syntax
<base:ajax
[ onajaxerror = "String" ]
[ onajaxsuccess = "String" ]
[ onajaxtimeout = "String" ]
[ timeout = "String" ]
>
...Body Content...

</base:ajax>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
onajaxerrorString This handler will be executed when the AJAX request returned with statusCode <> 200

Annotation: JavaScript Code

 
onajaxsuccessString This handler will be executed when the AJAX request returned with statusCode = 200

Annotation: JavaScript Code

 
onajaxtimeoutString If a AJAX timeout period is set, and it is reached before a response is received, a function reference assigned to this handler will be executed

Annotation: JavaScript Code

 
timeoutString Specifies the AJAX Timeout in milliseconds.

If the server does not respond within the specified time the configured onajaxtimeout JavaScript Handler will be called.

 

[ Example ]

Sets the AJAX properties for a page


<%@ taglib uri="http://www.common-controls.com/cc/tags-base"   prefix="base" %>

<base:ajax  onajaxerror="alert('help!'); return false;"/>