Active Controls (AJAX enabled Controls)
See the Introduction
for a quick overview of the concept behind active controls (AJAX enabled controls).
Most active controls have a property of
ActiveControl and
a sub-property ClientSide
that provides many properties to customize the controls. The
CallbackClient property of the
TPage class provides many methods to update and alter the client-side content
during a callback request. Active controls is reliant on a collection
of javascript classes.
For a quick demo of active controls, try the
TActiveButton control. See also the later part of the Currency Converter tutorial for a more in depth example.
Standard Active Controls
-
TActiveButton
represents a click button on a Web page. It can be used to trigger a callback request.
-
TActiveCheckBox
represents a checkbox on a Web page. It can be used to collect two-state user input
and can trigger a callback request.
-
TActiveCustomValidator
validates a particular control using a callback request.
-
TActiveDatePicker
adds a date picker that permits the suer to choose a date.
-
TActiveFileUpload
displays a file upload field on a page and uses an iframe to permit handling of the
file upload in a callback.
-
TActiveHiddenField
displays a hidden input field that can be changed upon callback.
-
TActiveHyperLink
represents a hyperlink on a Web page.
-
TActiveImage
represents an image on a Web page.
-
TActiveImageButton
represents a click button that has an image as the background.
It is can be used to trigger a callback request.
-
TActiveLabel
represents a label on a Web page.
The label can be customized via various CSS attributes.
-
TActiveLinkButton
represents a hyperlink that can perform a callback request.
-
TActiveMultiView
represents a container for a group of TView controls, each of which is container for other controls.
At any time, at most one TView is visible. It's the active counterpart of TMultiView.
-
TActivePanel
represents a container for other controls on a Web page. In HTML,
it is displayed as a <div> element. The panel's contents
can be replaced during a callback request.
-
TActivePager
generates UI that allows users to interactively specify which page of
data to be displayed in a data-bound control.
-
TActiveRadioButton
represents a radiobutton on a Web page.
It is mainly used in a group from which users make a choice. It can
be used to perform a callback request.
-
TActiveRatingList
is an EXPERIMENTAL class that displays clickable images that represent a TRadioButtonList.
-
TActiveTextBox
represents a text input field on a Web page.
It can collect single-line, multi-line or password text input from users.
It can be used to perform a callback request.
Active List Controls
-
TActiveCheckBoxList
displays a list of checkboxes on a Web page and each checkbox
can trigger a callback request.
-
TActiveDropDownList
displays a dropdown list box that allows users to select a
single option from a few prespecified ones. It can be used
to perform a callback request.
-
TActiveListBox
displays a list box that allows single or multiple selection. It can be used
to perform a callback request.
-
TActiveRadioButtonList
is similar to TActiveCheckBoxList in every aspect except that each
TActiveRadioButtonList displays a group of radiobuttons. Each radio button
can perform a callback request.
Active Data Controls
-
TActiveDataList
is used to display or modify a list of data items. It is the
active counterpart to the original TDataList control.
-
TActiveDataGrid
displays data in a tabular format with rows and columns. It is the
active counterpart to the original TDataGrid control.
-
TActiveRepeater
displays its content defined in templates repeatedly based on the given data.
It is the active counterpart to the original TRepeater control.
Extended Active Controls
-
TAutoComplete
extends TActiveTextBox to offer text completion suggestions.
-
TCallback
a generic control that can perform callback requests.
-
TEventTriggeredCallback
triggers a callback request based on HTML DOM events.
-
TInPlaceTextBox
represents a label that can be edited by clicked.
-
TTimeTriggeredCallback
triggers a callback request based on time elapsed.
-
TValueTriggeredCallback
monitors (using a timer) an attribute of an HTML element and triggers a callback request
when the attribute value changes.
-
TDropContainer & TDraggable represents drag and drop containers.
The former will make its child controls "draggable" while the latter will raise a callback when a draggable
control is dropped on it.
Active Control Abilities
The following table shows the Active Controls that can trigger a
callback event and whether the control will raise a PostBack event
if Javascript was disabled on the client's browser.
Active Control Basic Infrastructure Classes
The following classes provide the basic infrastructure classes required to
realize the active controls. They can be useful to develop new active controls, but Prado users tipically don't need
to use them.
-
TActiveControlAdapter
TActiveControlAdapter customizes the parent TControl class for active control classes.
It tracks changes in the viewstate values of the control and update
differences of the client-side HTML element attributes.
-
TActiveListControlAdapter
TActiveListControlAdapter allows the adapted list controls to change the selections
on the client-side during a callback request.
-
TActivePageAdapter
TActivePageAdapter process the page life-cycle for callback requests.
-
TBaseActiveControl
TBaseActiveControl class provided additional basic properties common for every
active control. An instance of TBaseActiveControl or its decendent
TBaseActiveCallbackControl is created by TActiveControlAdapter::getBaseActiveControl()
method.
The EnableUpdate property determines wether the active
control is allowed to update the contents of the client-side when the callback
response returns.
-
TCallbackResponseAdapter
TCallbackResponseAdapter alters the THttpResponse's outputs.
A TCallbackResponseWriter is used instead of the TTextWrite when
createHtmlWriter is called. Each call to createHtmlWriter will create
a new TCallbackResponseWriter. When flushContent() is called each
instance of TCallbackResponseWriter's content is flushed.
The callback response data can be set using the ResponseData property.
Active Control Infrastructure Advanced Classes
The following classes provide advanced properties and events needed to realize the active controls.
A Prado user can use them to customize active controls behaviour and interact directly with the client side during a callback.
-
TCallbackClientScript
methods to manipulate the client-side HTML elements, also includes methods
to invoke javascript Effects on HTML elements.
-
TCallbackClientSide
is used to specify client-side callback request options and client-side event handlers.
-
TCallbackEventParameter
provides the parameter passed during the callback request.
-
TCallbackOptions
allows a common set of callback client-side options to be attached to one or more active controls.
$Id$