Class TDataBoundControl

Description

TDataBoundControl class.

TDataBoundControl is the based class for controls that need to populate data from data sources. It provides basic properties and methods that allow the derived controls to associate with data sources and retrieve data from them.

TBC...

Located in /Web/UI/WebControls/TDataBoundControl.php (line 30)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --TDataBoundControl
Direct descendents
Class Description
TBaseDataList TBaseDataList class
TListControl TListControl class
TRepeater TRepeater class
Method Summary
void dataBind ()
void dataSourceViewChanged (mixed $sender, mixed $param)
void ensureDataBound ()
void getData ()
void getDataMember ()
Traversable getDataSource ()
string getDataSourceID ()
boolean getInitialized ()
boolean getIsDataBound ()
void onDataBound (mixed $param)
void onInit (TEventParameter $param)
void onPreRender (TEventParameter $param)
void pagePreLoad (mixed $sender, TEventParameter $param)
void performDataBinding (mixed $data)
void setDataMember (mixed $value)
void setDataSource (Traversable|array|string $value)
void setDataSourceID (string $value)
void setInitialized (boolean $value)
void setIsDataBound (boolean $value)
void setRequiresDataBinding (boolean $value)
Traversable validateDataSource (mixed $value)
Methods
dataBind (line 193)

Performs databinding.

This method overrides the parent implementation by calling performSelect which fetches data from data source and does the actual binding work.

  • access: public
void dataBind ()

Redefinition of:
TControl::dataBind()
Performs the databinding for this control.
dataSourceViewChanged (line 205)
  • access: public
void dataSourceViewChanged (mixed $sender, mixed $param)
determineDataSource (line 240)
  • access: protected
void determineDataSource ()
ensureDataBound (line 178)

Ensures any pending dataBind is called.

This method calls dataBind if the data source is specified by setDataSourceID or if RequiresDataBinding is true.

  • access: protected
void ensureDataBound ()
getData (line 211)
  • access: protected
void getData ()
getDataMember (line 342)
  • access: public
void getDataMember ()
getDataSource (line 48)
  • return: data source object, defaults to null.
  • access: public
Traversable getDataSource ()
getDataSourceID (line 69)
  • return: ID path to the data source control. Defaults to empty.
  • access: public
string getDataSourceID ()
getDataSourceView (line 219)
  • access: protected
void getDataSourceView ()
getInitialized (line 113)
  • return: whether the databound control has been initialized. By default, the control is initialized after its viewstate has been restored.
  • access: protected
boolean getInitialized ()
getIsDataBound (line 133)
  • return: whether databind has been invoked in the previous page request
  • access: protected
boolean getIsDataBound ()
getRequiresDataBinding (line 149)
  • return: whether a databind call is required (by the data bound control)
  • access: protected
boolean getRequiresDataBinding ()
getSelectParameters (line 352)
  • access: public
void getSelectParameters ()
getUsingDataSourceID (line 92)
  • return: if the databound control uses the data source specified by setDataSourceID, or it uses the data source object specified by setDataSource.
  • access: protected
boolean getUsingDataSourceID ()
onDataBound (line 269)

Raises OnDataBound event.

This method should be invoked after a databind is performed. It is mainly used by framework and component developers.

  • access: public
void onDataBound (mixed $param)
onDataSourceChanged (line 101)

Sets setRequiresDataBinding as true if the control is initialized.

This method is invoked when either setDataSource or setDataSourceID is changed.

  • access: public
void onDataSourceChanged ()
onInit (line 281)

Sets page's OnPreLoad event handler as pagePreLoad.

If viewstate is disabled and the current request is a postback, RequiresDataBinding will be set true. This method overrides the parent implementation.

  • access: public
void onInit (TEventParameter $param)

Redefinition of:
TControl::onInit()
This method is invoked when the control enters 'OnInit' stage.
onPreRender (line 307)

Ensures any pending databind is performed.

This method overrides the parent implementation.

  • access: public
void onPreRender (TEventParameter $param)

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

Redefined in descendants as:
pagePreLoad (line 294)

Sets getInitialized as true.

This method is invoked when page raises PreLoad event.

  • access: public
void pagePreLoad (mixed $sender, TEventParameter $param)
performDataBinding (line 262)
  • access: protected
  • abstract:
void performDataBinding (mixed $data)

Redefined in descendants as:
setDataMember (line 347)
  • access: public
void setDataMember (mixed $value)
setDataSource (line 60)

Sets the data source object associated with the databound control.

The data source must implement Traversable interface. If an array is given, it will be converted to xxx. If a string is given, it will be converted to xxx.

  • access: public
void setDataSource (Traversable|array|string $value)
  • Traversable|array|string $value: data source object
setDataSourceID (line 78)
  • access: public
void setDataSourceID (string $value)
  • string $value: ID path to the data source control. The data source control must be locatable via TControl::findControl call.
setInitialized (line 125)

Sets a value indicating whether the databound control is initialized.

If initialized, any modification to DataSource or DataSourceID will set RequiresDataBinding as true.

  • access: protected
void setInitialized (boolean $value)
  • boolean $value: a value indicating whether the databound control is initialized.
setIsDataBound (line 141)
  • access: protected
void setIsDataBound (boolean $value)
  • boolean $value: if databind has been invoked in this page request
setRequiresDataBinding (line 160)

Sets a value indicating whether a databind call is required by the data bound control.

If true and the control has been prerendered while it uses the data source specified by setDataSourceID, a databind call will be called by this method.

  • access: protected
void setRequiresDataBinding (boolean $value)
  • boolean $value: whether a databind call is required.
validateDataSource (line 320)

Validates if the parameter is a valid data source.

If it is a string or an array, it will be converted as a TList object.

  • return: the data that is traversable
  • access: protected
  • throws: TInvalidDataTypeException if the data is neither null nor Traversable
Traversable validateDataSource (mixed $value)

Inherited Methods

Inherited From TWebControl

TWebControl::addAttributesToRender()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
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::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()

Inherited From TControl

TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::broadcastEventInternal()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::createChildControls()
TControl::createControlCollection()
TControl::createdOnTemplate()
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::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasControls()
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::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
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::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
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

Documentation generated on Sun, 04 Jun 2006 18:59:01 -0400 by phpDocumentor 1.3.0RC4