Class TActiveCheckBox

Description

Implements interfaces:

TActiveCheckBox class.

The active control counter part to checkbox. The AutoPostBack property is set to true by default. Thus, when the checkbox is clicked a OnCallback event is raise after OnCheckedChanged event.

The Text and Checked properties can be changed during a callback.

  • since: 3.1
  • version: $Id: TActiveCheckBox.php 2268 2007-09-29 16:38:10Z xue $
  • author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/ActiveControls/TActiveCheckBox.php (line 33)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --TCheckBox
               |
               --TActiveCheckBox
Method Summary
TActiveCheckBox __construct ()
string getClientClassName ()
string getDefaultLabelID ()
void renderClientControlScript (mixed $writer)
void renderInputTag (THtmlWriter $writer, string $clientID, string $onclick)
void renderLabel (THtmlWriter $writer, string $clientID, string $text)
void setChecked (boolean $value)
void setText (string $value)
Methods
Constructor __construct (line 40)

Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.

  • access: public
TActiveCheckBox __construct ()

Redefinition of:
TControl::__construct()
Constructor.
getActiveControl (line 50)
  • return: standard callback control options.
  • access: public
TBaseActiveCallbackControl getActiveControl ()
getClientClassName (line 138)
  • return: corresponding javascript class name for this TActiveCheckBox.
  • access: protected
string getClientClassName ()

Redefinition of:
TCheckBox::getClientClassName()
Gets the name of the javascript class responsible for performing postback for this control.
getClientSide (line 58)
  • return: client side request options.
  • access: public
TCallbackClientSide getClientSide ()
getDefaultLabelID (line 169)
  • return: checkbox label ID;
  • access: protected
string getDefaultLabelID ()
getLabelAttributes (line 147)

Overrides parent implementation to ensure label has ID.

  • return: list of attributes to be rendered for label beside the checkbox
  • access: public
TMap getLabelAttributes ()

Redefinition of:
TCheckBox::getLabelAttributes()
onCallback (line 81)

This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.

  • access: public
void onCallback (TCallbackEventParameter $param)
raiseCallbackEvent (line 69)

Raises the callback event. This method is required by ICallbackEventHandler interface.

This method is mainly used by framework and control developers.

  • access: public
void raiseCallbackEvent (TCallbackEventParameter $param)
renderClientControlScript (line 117)

Override parent implementation, no javascript is rendered here instead the javascript required for active control is registered in addAttributesToRender.

  • access: protected
void renderClientControlScript (mixed $writer)

Redefinition of:
TCheckBox::renderClientControlScript()
Renders the client-script code.
renderInputTag (line 128)

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.

  • access: protected
void renderInputTag (THtmlWriter $writer, string $clientID, string $onclick)
  • THtmlWriter $writer: the writer for the rendering purpose
  • string $clientID: checkbox id
  • string $onclick: onclick js

Redefinition of:
TCheckBox::renderInputTag()
Renders a checkbox input element.
renderLabel (line 160)

Renders a label beside the checkbox.

  • access: protected
void renderLabel (THtmlWriter $writer, string $clientID, string $text)
  • THtmlWriter $writer: the writer for the rendering purpose
  • string $clientID: checkbox id
  • string $text: label text

Redefinition of:
TCheckBox::renderLabel()
Renders a label beside the checkbox.
setChecked (line 105)

Sets a value indicating whether the checkbox is to be checked or not.

Updates checkbox checked state on the client-side if the setEnableUpdate property is set to true.

  • access: public
void setChecked (boolean $value)
  • boolean $value: whether the checkbox is to be checked or not.

Redefinition of:
TCheckBox::setChecked()
Sets a value indicating whether the checkbox is to be checked or not.
setText (line 91)

Updates the button text on the client-side if the setEnableUpdate property is set to true.

  • access: public
void setText (string $value)
  • string $value: caption of the button

Redefinition of:
TCheckBox::setText()
Sets the text caption of the checkbox.

Inherited Methods

Inherited From TCheckBox

TCheckBox::getAutoPostBack()
TCheckBox::getCausesValidation()
TCheckBox::getChecked()
TCheckBox::getClientClassName()
TCheckBox::getData()
TCheckBox::getDataChanged()
TCheckBox::getEnableClientScript()
TCheckBox::getInputAttributes()
TCheckBox::getLabelAttributes()
TCheckBox::getPostBackOptions()
TCheckBox::getSpanNeeded()
TCheckBox::getSurroundingTagID()
TCheckBox::getTagName()
TCheckBox::getText()
TCheckBox::getTextAlign()
TCheckBox::getValidationGroup()
TCheckBox::getValidationPropertyValue()
TCheckBox::getValue()
TCheckBox::getValueAttribute()
TCheckBox::loadPostData()
TCheckBox::onCheckedChanged()
TCheckBox::onPreRender()
TCheckBox::raisePostDataChangedEvent()
TCheckBox::render()
TCheckBox::renderClientControlScript()
TCheckBox::renderInputTag()
TCheckBox::renderLabel()
TCheckBox::setAutoPostBack()
TCheckBox::setCausesValidation()
TCheckBox::setChecked()
TCheckBox::setData()
TCheckBox::setEnableClientScript()
TCheckBox::setText()
TCheckBox::setTextAlign()
TCheckBox::setValidationGroup()
TCheckBox::setValue()

Inherited From TWebControl

TWebControl::addAttributesToRender()
TWebControl::clearStyle()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getDisplay()
TWebControl::getFont()
TWebControl::getForeColor()
TWebControl::getHasStyle()
TWebControl::getHeight()
TWebControl::getStyle()
TWebControl::getTabIndex()
TWebControl::getTagName()
TWebControl::getToolTip()
TWebControl::getWidth()
TWebControl::render()
TWebControl::renderBeginTag()
TWebControl::renderContents()
TWebControl::renderEndTag()
TWebControl::setAccessKey()
TWebControl::setBackColor()
TWebControl::setBorderColor()
TWebControl::setBorderStyle()
TWebControl::setBorderWidth()
TWebControl::setCssClass()
TWebControl::setDisplay()
TWebControl::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()

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:29:25 -0400 by phpDocumentor 1.3.0RC4