PHP Класс Prado\Web\UI\ActiveControls\TInPlaceTextBox

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 {@link setEditTriggerControlID EditTriggerControlID} is clicked. If the {@link 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 {@link 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 {@link setAutoPostBack AutoPostBack} is true and the textbox content has changed, a callback request is made and the {@link 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 {@link setAutoHideTextBox AutoHideTextBox} property is true, then the textbox will be hidden and the label is then shown. Since 3.1.2, you can set the {@link setReadOnly ReadOnly} property to make the control not editable. This property can be also changed on callback
С версии: 3.1
Наследование: extends TActiveTextBox
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) Sets the auto post back to true by default.
getAutoHideTextBox ( ) : boolean
getDisplayTextBox ( ) : boolean
getEditTriggerControlID ( ) : string
onCallback ( $param ) 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 ( $param ) Raised when editing the content is requsted to be loaded from the server side.
onPreRender ( $param ) Registers CSS and JS.
renderContents ( $writer ) Renders the body content of the label.
setAutoHideTextBox ( $value )
setDisplayTextBox ( $value )
setEditTriggerControlID ( $value )
setReadOnly ( $value ) Update ClientSide Readonly property
setText ( $value ) On callback response, the inner HTMl of the label and the value of the textbox is updated

Защищенные методы

Метод Описание
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
callClientFunction ( $func, $value ) Calls the client-side static method for this control class.
getClientClassName ( ) : string
getExternalControlID ( ) : string
getLabelClientID ( ) : string
getPostBackOptions ( ) : array
getTagName ( ) : string
registerClientScript ( ) Registers the relevant JavaScript.

Описание методов

__construct() публичный Метод

Sets the auto post back to true by default.
public __construct ( )

addAttributesToRender() защищенный Метод

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
protected addAttributesToRender ( $writer )

callClientFunction() защищенный Метод

Calls the client-side static method for this control class.
protected callClientFunction ( $func, $value )

getAutoHideTextBox() публичный Метод

public getAutoHideTextBox ( ) : boolean
Результат boolean true will hide the textbox after losing focus.

getClientClassName() защищенный Метод

protected getClientClassName ( ) : string
Результат string corresponding javascript class name for this TInPlaceTextBox

getDisplayTextBox() публичный Метод

public getDisplayTextBox ( ) : boolean
Результат boolean true to display the edit textbox

getEditTriggerControlID() публичный Метод

public getEditTriggerControlID ( ) : string
Результат string ID of the control that can trigger to edit the textbox

getExternalControlID() защищенный Метод

protected getExternalControlID ( ) : string
Результат string edit trigger control client ID.

getLabelClientID() защищенный Метод

protected getLabelClientID ( ) : string
Результат string label client ID

getPostBackOptions() защищенный Метод

protected getPostBackOptions ( ) : array
Результат array callback options.

getTagName() защищенный Метод

protected getTagName ( ) : string
Результат string tag name of the label.

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.
public onCallback ( $param )

onLoadingText() публичный Метод

Raised when editing the content is requsted to be loaded from the server side.
public onLoadingText ( $param )

onPreRender() публичный Метод

This method is invoked right before the control rendering, if the control is visible.
public onPreRender ( $param )

registerClientScript() защищенный Метод

Registers the relevant JavaScript.
protected registerClientScript ( )

renderContents() публичный Метод

Renders the body content of the label.
public renderContents ( $writer )

setAutoHideTextBox() публичный Метод

public setAutoHideTextBox ( $value )

setDisplayTextBox() публичный Метод

public setDisplayTextBox ( $value )

setEditTriggerControlID() публичный Метод

public setEditTriggerControlID ( $value )

setReadOnly() публичный Метод

Update ClientSide Readonly property
С версии: 3.1.2
public setReadOnly ( $value )

setText() публичный Метод

On callback response, the inner HTMl of the label and the value of the textbox is updated
public setText ( $value )