Class TInPlaceTextBox

Description

TInPlaceTextBox Class

* TInPlaceTextBox is a component rendered as a label and allows its contents to be edited by changing the label to a textbox when the label is clicked or when another control or html element with ID given by EditTriggerControlID is clicked.

If the OnLoadingText event is handled, a callback request is made when the label is clicked, while the request is being made the textbox is disabled from editing. The OnLoadingText event allows you to update the content of the textbox before the client is allowed to edit the content. After the callback request returns successfully, the textbox is enabled and the contents is then allowed to be edited.

Once the textbox loses focus, if AutoPostBack is true and the textbox content has changed, a callback request is made and the OnTextChanged event is raised like that of the TActiveTextBox. During the request, the textbox is disabled.

After the callback request returns sucessfully, the textbox is enabled. If the AutoHideTextBox property is true, then the textbox will be hidden and the label is then shown.

  • since: 3.1
  • version: $Id: TInPlaceTextBox.php 1459 2006-10-08 05:11:23Z wei $
  • author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/ActiveControls/TInPlaceTextBox.php (line 42)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --TTextBox
               |
               --TActiveTextBox
                  |
                  --TInPlaceTextBox
Method Summary
TInPlaceTextBox __construct ()
void callClientFunction (string $func, mixed $value)
boolean getAutoHideTextBox ()
string getClientClassName ()
boolean getDisplayTextBox ()
string getLabelClientID ()
string getTagName ()
void renderClientControlScript (mixed $writer)
void renderContents (THtmlWriter $writer)
void setAutoHideTextBox (boolean $value)
void setDisplayTextBox (boolean $value)
void setEditTriggerControlID (string $value)
void setText (string $value)
Methods
Constructor __construct (line 47)

Sets the auto post back to true by default.

  • access: public
TInPlaceTextBox __construct ()

Redefinition of:
TActiveTextBox::__construct()
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.
addAttributesToRender (line 157)

Adds attributes to renderer.

  • access: protected
  • throws: TInvalidDataValueException if associated control cannot be found using the ID
void addAttributesToRender (THtmlWriter $writer)

Redefinition of:
TTextBox::addAttributesToRender()
Adds attribute name-value pairs to renderer.
callClientFunction (line 93)

Calls the client-side static method for this control class.

  • access: protected
void callClientFunction (string $func, mixed $value)
  • string $func: static method name
  • mixed $value: method parmaeter
getAutoHideTextBox (line 64)
  • return: true will hide the textbox after losing focus.
  • access: public
boolean getAutoHideTextBox ()
getClientClassName (line 255)
  • return: corresponding javascript class name for this TInPlaceTextBox
  • access: protected
string getClientClassName ()

Redefinition of:
TActiveTextBox::getClientClassName()
Gets the name of the javascript class responsible for performing postback for this control.
getDisplayTextBox (line 83)
  • return: true to display the edit textbox
  • access: public
boolean getDisplayTextBox ()
getEditTriggerControlID (line 111)
  • return: ID of the control that can trigger to edit the textbox
  • access: public
string getEditTriggerControlID ()
getExternalControlID (line 119)
  • return: edit trigger control client ID.
  • access: protected
string getExternalControlID ()
getLabelClientID (line 182)
  • return: label client ID
  • access: protected
string getLabelClientID ()
getPostBackOptions (line 208)
  • return: callback options.
  • access: protected
array getPostBackOptions ()

Redefinition of:
TTextBox::getPostBackOptions()
Gets the post back options for this textbox.
getTagName (line 147)
  • return: tag name of the label.
  • access: protected
string getTagName ()

Redefinition of:
TTextBox::getTagName()
onCallback (line 194)

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)

Redefinition of:
TActiveTextBox::onCallback()
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.
onLoadingText (line 238)

Raised when editing the content is requsted to be loaded from the server side.

  • access: public
void onLoadingText (TCallbackEventParameter $param)
renderClientControlScript (line 246)

Registers the javascript code for initializing the active control.

  • access: protected
void renderClientControlScript (mixed $writer)

Redefinition of:
TActiveTextBox::renderClientControlScript()
Renders the javascript for textbox.
renderContents (line 171)

Renders the body content of the label.

  • access: public
void renderContents (THtmlWriter $writer)

Redefinition of:
TTextBox::renderContents()
Renders the body content of the textbox when it is in MultiLine text mode.
setAutoHideTextBox (line 56)
  • access: public
void setAutoHideTextBox (boolean $value)
  • boolean $value: true to hide the textbox after losing focus.
setDisplayTextBox (line 72)
  • access: public
void setDisplayTextBox (boolean $value)
  • boolean $value: true to display the edit textbox
setEditTriggerControlID (line 103)
  • access: public
void setEditTriggerControlID (string $value)
  • string $value: ID of the control that can trigger to edit the textbox
setText (line 133)

On callback response, the inner HTMl of the label and the

value of the textbox is updated

  • access: public
void setText (string $value)
  • string $value: the text value of the label

Redefinition of:
TActiveTextBox::setText()
Client-side Text property can only be updated after the OnLoad stage.

Inherited Methods

Inherited From TActiveTextBox

TActiveTextBox::__construct()
TActiveTextBox::getActiveControl()
TActiveTextBox::getClientClassName()
TActiveTextBox::getClientSide()
TActiveTextBox::onCallback()
TActiveTextBox::raiseCallbackEvent()
TActiveTextBox::renderClientControlScript()
TActiveTextBox::setText()

Inherited From TTextBox

TTextBox::addAttributesToRender()
TTextBox::getAutoCompleteType()
TTextBox::getAutoPostBack()
TTextBox::getAutoTrim()
TTextBox::getCausesValidation()
TTextBox::getClientClassName()
TTextBox::getColumns()
TTextBox::getEnableClientScript()
TTextBox::getMaxLength()
TTextBox::getPostBackOptions()
TTextBox::getReadOnly()
TTextBox::getRows()
TTextBox::getSafeText()
TTextBox::getSafeTextParser()
TTextBox::getTagName()
TTextBox::getText()
TTextBox::getTextMode()
TTextBox::getValidationGroup()
TTextBox::getValidationPropertyValue()
TTextBox::getWrap()
TTextBox::loadPostData()
TTextBox::onTextChanged()
TTextBox::raisePostDataChangedEvent()
TTextBox::renderClientControlScript()
TTextBox::renderContents()
TTextBox::setAutoCompleteType()
TTextBox::setAutoPostBack()
TTextBox::setAutoTrim()
TTextBox::setCausesValidation()
TTextBox::setColumns()
TTextBox::setEnableClientScript()
TTextBox::setMaxLength()
TTextBox::setReadOnly()
TTextBox::setRows()
TTextBox::setText()
TTextBox::setTextMode()
TTextBox::setValidationGroup()
TTextBox::setWrap()

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::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
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::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 Sun, 14 Jan 2007 21:42:57 -0500 by phpDocumentor 1.3.0RC4