Class \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 \Prado\Web\UI\ActiveControls\setEditTriggerControlID 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 \Prado\Web\UI\ActiveControls\setAutoPostBack 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 \Prado\Web\UI\ActiveControls\setAutoHideTextBox property is true, then the textbox will be hidden and the label is then shown.
Since 3.1.2, you can set the \Prado\Web\UI\ActiveControls\setReadOnly property to make the control not editable. This property can be also changed on callback
Class hierarchy
- \Prado\Web\UI\ActiveControls\TInPlaceTextBox
- \Prado\Web\UI\ActiveControls\TActiveTextBox implements IActiveControl, ICallbackEventHandler
- \Prado\Web\UI\WebControls\TTextBox implements IPostBackDataHandler, IValidatable, IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.1
public
|
|
public
|
|
public
|
|
public
|
|
public
|
onCallback(TCallbackEventParameter $param) : mixed
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
|
onLoadingText(TCallbackEventParameter $param) : mixed
Raised when editing the content is requsted to be loaded from the
server side.
|
public
|
onPreRender(mixed $param) : mixed
Registers CSS and JS.
This method is invoked right before the control rendering, if the control is visible. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
setText(string $value) : mixed
On callback response, the inner HTMl of the label and the
value of the textbox is updated
|
protected
|
addAttributesToRender(mixed $writer) : mixed
Ensure that the ID attribute is rendered and registers the javascript code
for initializing the active control.
|
protected
|
callClientFunction(string $func, mixed $value) : mixed
Calls the client-side static method for this control class.
|
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|