Constructor.
TCallbackClientScript
__construct
()
Add a Css class name to the element.
void
addCssClass
(
TControl $element,
string $cssClass)
-
TControl
$element: control element or element id
-
string
$cssClass: CssClass name to add.
void
addPostDataLoader
(mixed $name)
Visual Effect: Gradually make the element appear.
void
appear
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Append a HTML fragement to the element.
void
appendContent
(
TControl $element,
string $content)
-
TControl
$element: control element or element id
-
string
$content: HTML fragement or the control to be rendered
Visual Effect: Blind down.
void
blindDown
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Visual Effect: Blind up.
void
blindUp
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Executes a client-side statement.
void
callClientFunction
(string $function, [array $params = null])
-
string
$function: javascript function name
-
array
$params: list of arguments for the function
Client script to check or uncheck a checkbox or radio button.
void
check
(
TControl $checkbox, [
boolean $checked =
true])
-
TControl
$checkbox: control element or element id
-
boolean
$checked: check or uncheck the checkbox or radio button.
Client script to click on an element.
is unpredictable.</b>
-
TControl
$control: control element or element id
Visual Effect: Drop out.
void
dropOut
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Evaluate a block of javascript enclosed in a boundary.
Visual Effect: Gradually fade the element.
void
fade
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Focus on a particular element.
-
TControl
$element: control element or element id.
Visual Effect: Fold.
void
fold
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
array
getClientFunctionsToExecute
()
Visual Effect: Gradually make an element grow to a predetermined size.
void
grow
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Hides an element by changing its CSS display style to "none".
-
TControl
$element: control element or element id
Visual Effect: High light the element for about 2 seconds.
void
highlight
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Insert a HTML fragement after the element.
void
insertContentAfter
(
TControl $element,
string $content)
-
TControl
$element: control element or element id
-
string
$content: HTML fragement or the control to be rendered
Insert a HTML fragement in before the element.
void
insertContentBefore
(
TControl $element,
string $content)
-
TControl
$element: control element or element id
-
string
$content: HTML fragement or the control to be rendered
Prepend a HTML fragement to the element.
void
prependContent
(
TControl $element,
string $content)
-
TControl
$element: control element or element id
-
string
$content: HTML fragement or the control to be rendered
Visual Effect: Gradually grow and fade the element.
void
puff
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Visual Effect: Pulsate.
void
pulsate
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Raise the client side event (given by $eventName) on a particular element.
void
raiseClientEvent
(
TControl $control,
string $eventName)
-
TControl
$control: control element or element id
-
string
$eventName: Event name, e.g. "click"
Removes an element from the HTML page.
-
TControl
$element: control element or element id
Remove a Css class name from the element.
void
removeCssClass
(
TControl $element,
string $cssClass)
-
TControl
$element: control element or element id
-
string
$cssClass: CssClass name to remove.
Replace the content of an element with new content. The new content can be a string or a TControl component. If the <tt>content</tt> parameter is a TControl component, its rendered method will be called and its contents will be used for replacement.
void
replace
(
TControl $element,
string $content, [
string $method =
"Element.replace"], [
string $boundary =
null])
-
TControl
$element: control element or HTML element id.
-
string
$content: HTML fragement or the control to be rendered
-
string
$method: replacement method, default is to replace the outter html content.
-
string
$boundary: provide a custom boundary.
Replace the content of an element with new content contained in writer.
void
replaceContent
(
TControl $element,
string $content)
-
TControl
$element: control element or HTML element id.
-
string
$content: HTML fragement or the control to be rendered
Scroll the top of the browser viewing area to the location of the element.
-
TControl
$element: control element or element id
Client script to select/clear/check a drop down list, check box list, or radio button list.
The second parameter determines the selection method. Valid methods are
- Value, select or check by value
- Values, select or check by a list of values
- Index, select or check by index (zero based index)
- Indices, select or check by a list of index (zero based index)
- Clear, clears or selections or checks in the list
- All, select all
- Invert, invert the selection.
void
select
(
TControl $control, [
string $method =
'Value'], [
string|int $value =
null], [
string $type =
null])
-
TControl
$control: list control
-
string
$method: selection method
-
string|int
$value: the value or index to select/check.
-
string
$type: selection control type, either 'check' or 'select'
Sets the attribute of a particular control.
void
setAttribute
(
TControl $control,
string $name,
string $value)
-
TControl
$control: control element or element id
-
string
$name: attribute name
-
string
$value: attribute value
Sets the options of a select input element.
void
setListItems
(
TControl $control,
TCollection $items)
-
TControl
$control: control element or element id
-
TCollection
$items: a list of new options
Set the opacity on a html element or control.
void
setOpacity
(
TControl $element,
float $value)
-
TControl
$element: control element or element id
-
float
$value: opacity value between 1 and 0
Sets the style of element. The style must be a key-value array where the key is the style property and the value is the style value.
void
setStyle
(
TControl $element,
array $styles)
-
TControl
$element: control element or element id
-
array
$styles: list of key-value pairs as style property and style value.
Client script to set the value of a particular input element.
void
setValue
(
TControl $input,
string $text)
-
TControl
$input: control element to set the new value
-
string
$text: new value
Visual Effect: Shake the element.
void
shake
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Shows an element by changing its CSS display style as empty.
-
TControl
$element: control element or element id
Visual Effect: Shrink the element.
void
shrink
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Visual Effect: Slide down.
void
slideDown
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Visual Effect: Side up.
void
slideUp
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Visual Effect: Squish the element.
void
squish
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Visual Effect: Switch Off effect.
void
switchOff
(
TControl $element, [
array $options =
null])
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Toggles the visibility of the element.
void
toggle
(
TControl $element, [
string $effect =
null], [
array $options =
array()])
-
TControl
$element: control element or element id
-
string
$effect: visual effect, such as, 'appear' or 'slide' or 'blind'.
-
array
$options: additional options.
Update the element's innerHTML with new content.
-
TControl
$element: control element or element id
-
TControl
$content: new HTML content, if content is of a TControl, the controls render method is called.
Add a visual effect the element.
void
visualEffect
(
string $type,
TControl $element, [
array $options =
null])
-
string
$type: visual effect function name.
-
TControl
$element: control element or element id
-
array
$options: visual effect key-value pair options.
Inherited Methods
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()