## Class TActiveRadioButton

Description

Implements interfaces:

- IActiveControl
- ICallbackEventHandler

TActiveRadioButton class.

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

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

The GroupName property may NOT be changed during callback because the client-side <tt>name</tt> attribute is read-only and can not be changed using javascript.

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

Located in /Web/UI/ActiveControls/TActiveRadioButton.php (line 32)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TWebControl
                |
                --TCheckBox
                   |
                   --TRadioButton
                      |
                      --TActiveRadioButton

Method Summary
TActiveRadioButton __construct ()
TBaseActiveCallbackControl getActiveControl ()
string getClientClassName ()
TCallbackClientSide getClientSide ()
string getDefaultLabelID ()
TMap getLabelAttributes ()
void onCallback (TCallbackEventParameter $param)
void raiseCallbackEvent (TCallbackEventParameter $param)
void renderClientControlScript (mixed $writer)
void renderInputTag (mixed $writer, mixed $clientID, mixed $onclick)
void renderLabel (THtmlWriter $writer, string $clientID, string $text)
void setChecked (boolean $value)
void setText (string $value)
Methods
Constructor __construct (line 39)

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

TActiveRadioButton __construct ()

Redefinition of:

TRadioButton::__construct()
  Constructor.

getActiveControl (line 49)

- return: standard callback control options.
- access: public

TBaseActiveCallbackControl getActiveControl ()
getClientClassName (line 134)

- return: corresponding javascript class name for this TActiveRadioButton.
- access: protected

string getClientClassName ()

Redefinition of:

TRadioButton::getClientClassName()
  Gets the name of the javascript class responsible for performing postback for this control.

getClientSide (line 57)

- return: client side request options.
- access: public

TCallbackClientSide getClientSide ()
getDefaultLabelID (line 165)

- return: radio button label ID;
- access: protected

string getDefaultLabelID ()
getLabelAttributes (line 143)

Overrides parent implementation to ensure label has ID.

- return: list of attributes to be rendered for label beside the radio button
- access: public

TMap getLabelAttributes ()

Redefinition of:

TCheckBox::getLabelAttributes()

onCallback (line 80)

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)

- TCallbackEventParameter $param: event parameter to be passed to the event handlers

raiseCallbackEvent (line 68)

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)

- TCallbackEventParameter $param: the event parameter

renderClientControlScript (line 116)

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:

TRadioButton::renderClientControlScript()
  Renders the client-script code.

renderInputTag (line 124)

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

- access: protected

void renderInputTag (mixed $writer, mixed $clientID, mixed $onclick)

Redefinition of:

TRadioButton::renderInputTag()
  Renders a radiobutton input element.

renderLabel (line 156)

Renders a label beside the radio button.

- access: protected

void renderLabel (THtmlWriter $writer, string $clientID, string $text)

- THtmlWriter $writer: the writer for the rendering purpose
- string $clientID: radio button id
- string $text: label text

Redefinition of:

TCheckBox::renderLabel()
  Renders a label beside the checkbox.

setChecked (line 104)

Checks the radio button.

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

- access: public

void setChecked (boolean $value)

- boolean $value: whether the radio button 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 90)

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 TRadioButton

> TRadioButton::__construct()
> TRadioButton::addToPostDataLoader()
> TRadioButton::getClientClassName()
> TRadioButton::getEnableClientScript()
> TRadioButton::getGroupName()
> TRadioButton::getRadioButtonsInGroup()
> TRadioButton::getUniqueGroupName()
> TRadioButton::getValueAttribute()
> TRadioButton::loadPostData()
> TRadioButton::onInit()
> TRadioButton::onUnLoad()
> TRadioButton::renderClientControlScript()
> TRadioButton::renderInputTag()
> TRadioButton::setEnableClientScript()
> TRadioButton::setGroupName()
> TRadioButton::setUniqueGroupName()

Inherited From TCheckBox

> TCheckBox::getAutoPostBack()
> TCheckBox::getCausesValidation()
> TCheckBox::getChecked()
> TCheckBox::getClientClassName()
> TCheckBox::getData()
> TCheckBox::getDataChanged()
> TCheckBox::getEnableClientScript()
> TCheckBox::getInputAttributes()
> TCheckBox::getLabelAttributes()
> TCheckBox::getPostBackOptions()
> 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

#### Inherited Constants

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Sun, 30 Sep 2007 19:10:14 -0400 by phpDocumentor 1.3.0RC4