Class TClientScript

Description

TClientScript class

Allows importing of Prado Client Scripts from template via the PradoScripts property. Multiple Prado client-scripts can be specified using comma delimited string of the javascript library to include on the page. For example,

  1. <com:TClientScript PradoScripts="effects, rico" />

Custom javascript files can be register using the ScriptUrl property.

  1. <com:TClientScript ScriptUrl=<%~ test.js %> />

Contents within TClientScript will be treated as javascript code and will be rendered in place.

  • since: 3.0
  • version: $Id: TClientScript.php 1840 2007-04-05 07:46:04Z wei $
  • author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/WebControls/TClientScript.php (line 39)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TClientScript
Method Summary
string getPradoScripts ()
string getScriptUrl ()
void onPreRender (mixed $param)
void render (THtmlWriter $writer)
void renderCustomScriptFile (THtmLWriter $writer)
void setPradoScripts (string $value)
void setScriptUrl (string $value)
Methods
getPradoScripts (line 45)
  • return: comma delimited list of javascript libraries to included on the page.
  • access: public
string getPradoScripts ()
getScriptUrl (line 65)
  • return: custom javascript file url.
  • access: public
string getScriptUrl ()
onPreRender (line 83)

Calls the client script manager to add each of the requested client script libraries.

  • access: public
void onPreRender (mixed $param)
  • mixed $param: event parameter

Redefinition of:
TControl::onPreRender()
This method is invoked when the control enters 'OnPreRender' stage.
render (line 101)

Renders the body content as javascript block.

Overrides parent implementation, parent renderChildren method is called during registerCustomScript.

  • access: public
void render (THtmlWriter $writer)

Redefinition of:
TControl::render()
Renders the control.
renderCustomScript (line 121)

Registers the body content as javascript.

  • access: protected
void renderCustomScript (THtmlWriter $writer)
renderCustomScriptFile (line 111)

Renders the custom script file.

  • access: protected
void renderCustomScriptFile (THtmLWriter $writer)
  • THtmLWriter $writer: the renderer
setPradoScripts (line 57)

Include javascript library to the current page. The current supported libraries are: "prado", "effects", "ajax", "validator", "logger", "datepicker", "colorpicker". Library dependencies are automatically resolved.

  • access: public
void setPradoScripts (string $value)
  • string $value: comma delimited list of javascript libraries to include.
setScriptUrl (line 73)
  • access: public
void setScriptUrl (string $value)
  • string $value: custom javascript file url.

Inherited Methods

Inherited From TControl

TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::convertUniqueIdToClientId()
TControl::createChildControls()
TControl::createControlCollection()
TControl::dataBind()
TControl::dataBindChildren()
TControl::dataBindProperties()
TControl::ensureChildControls()
TControl::findControl()
TControl::findControlsByID()
TControl::findControlsByType()
TControl::focus()
TControl::getAdapter()
TControl::getAllowChildControls()
TControl::getAttribute()
TControl::getAttributes()
TControl::getChildControlsCreated()
TControl::getClientID()
TControl::getControls()
TControl::getControlStage()
TControl::getControlState()
TControl::getCustomData()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasChildInitialized()
TControl::getHasControls()
TControl::getHasInitialized()
TControl::getHasLoaded()
TControl::getHasLoadedPostData()
TControl::getHasPreRendered()
TControl::getID()
TControl::getNamingContainer()
TControl::getPage()
TControl::getParent()
TControl::getRegisteredObject()
TControl::getSkinID()
TControl::getSourceTemplateControl()
TControl::getTemplateControl()
TControl::getUniqueID()
TControl::getViewState()
TControl::getVisible()
TControl::hasAttribute()
TControl::initRecursive()
TControl::isDescendentOf()
TControl::isObjectRegistered()
TControl::loadRecursive()
TControl::loadState()
TControl::loadStateRecursive()
TControl::onDataBinding()
TControl::onInit()
TControl::onLoad()
TControl::onPreRender()
TControl::onUnload()
TControl::preRenderRecursive()
TControl::raiseBubbleEvent()
TControl::registerObject()
TControl::removeAttribute()
TControl::removedControl()
TControl::render()
TControl::renderChildren()
TControl::renderControl()
TControl::saveState()
TControl::saveStateRecursive()
TControl::setAdapter()
TControl::setAttribute()
TControl::setChildControlsCreated()
TControl::setControlStage()
TControl::setControlState()
TControl::setCustomData()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::trackViewState()
TControl::traverseChildControls()
TControl::unbindProperty()
TControl::unloadRecursive()
TControl::unregisterObject()
TControl::__get()

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()
Class Constants

Documentation generated on Mon, 21 Apr 2008 11:33:21 -0400 by phpDocumentor 1.3.0RC4