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
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__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 )