## Class TActiveControlAdapter

Description

TActiveControlAdapter class.

Customize the parent TControl class for active control classes. TActiveControlAdapter instantiates a common base active control class throught the BaseActiveControl property. The type of BaseActiveControl can be provided in the second parameter in the constructor. Default is TBaseActiveControl or TBaseActiveCallbackControl if the control adapted implements ICallbackEventHandler.

TActiveControlAdapter will tracking viewstate changes to update the corresponding client-side properties.

- since: 3.1
- version: $Id: TActiveControlAdapter.php 2419 2008-04-08 15:52:53Z tof $
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/ActiveControls/TActiveControlAdapter.php (line 36)

    TComponent
       |
       --TApplicationComponent
          |
          --TControlAdapter
             |
             --TActiveControlAdapter

Direct descendents

Class | Description
--- | ---
TActiveListControlAdapter | TActiveListControlAdapter class.

Method Summary
TActiveControlAdapter __construct (IActiveControl $control, [string $baseCallbackClass = null])
TBaseActiveControl getBaseActiveControl ()
boolean getIsTrackingPageState ()
TCallbackPageStateTracker getStateTracker ()
void onLoad (mixed $param)
void render (mixed $writer)
void renderCallbackClientScripts ()
void saveState ()
void setBaseActiveControl (TBaseActiveControl $control)
void setBaseControlClass (string $type)
Methods
Constructor __construct (line 56)

Constructor.

- access: public

TActiveControlAdapter __construct (IActiveControl $control, [string $baseCallbackClass = null])

- IActiveControl $control: active control to adapt.
- string $baseCallbackClass: Base active control class name.

Redefinition of:

TControlAdapter::__construct()
  Constructor.

getBaseActiveControl (line 118)

- return: Common active control options.
- access: public

TBaseActiveControl getBaseActiveControl ()
getIsTrackingPageState (line 131)

- return: true if the viewstate needs to be tracked.
- access: protected

boolean getIsTrackingPageState ()
getStateTracker (line 175)

- return: state tracker.
- access: public

TCallbackPageStateTracker getStateTracker ()
onLoad (line 148)

Starts viewstate tracking if necessary after when controls has been loaded

- access: public

void onLoad (mixed $param)

Redefinition of:

TControlAdapter::onLoad()
  This method is invoked when the control enters 'OnLoad' stage.

render (line 81)

Renders the callback client scripts.

- access: public

void render (mixed $writer)

Redefinition of:

TControlAdapter::render()
  This method is invoked when the control renders itself.

renderCallbackClientScripts (line 90)

Register the callback clientscripts and sets the post loader IDs.

- access: protected

void renderCallbackClientScripts ()
saveState (line 162)

Saves additional persistent control state. Respond to viewstate changes if necessary.

- access: public

void saveState ()

Redefinition of:

TControlAdapter::saveState()
  Saves additional persistent control state.

setBaseActiveControl (line 110)

- access: public

void setBaseActiveControl (TBaseActiveControl $control)

- TBaseActiveControl $control: change base active control

setBaseControlClass (line 65)

- access: protected

void setBaseControlClass (string $type)

- string $type: base active control instance

#### Inherited Methods

Inherited From TControlAdapter

> TControlAdapter::__construct()
> TControlAdapter::createChildControls()
> TControlAdapter::getControl()
> TControlAdapter::getPage()
> TControlAdapter::loadState()
> TControlAdapter::onInit()
> TControlAdapter::onLoad()
> TControlAdapter::onPreRender()
> TControlAdapter::onUnload()
> TControlAdapter::render()
> TControlAdapter::renderChildren()
> TControlAdapter::saveState()

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

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