Class \Prado\Web\UI\ActiveControls\TActiveCheckBox
TActiveCheckBox class.
The active control counter part to checkbox. The \Prado\Web\UI\ActiveControls\setAutoPostBack property is set to true by default. Thus, when the checkbox is clicked a \Prado\Web\UI\ActiveControls\onCallback event is raise after OnCheckedChanged event.
The \Prado\Web\UI\ActiveControls\setText and \Prado\Web\UI\ActiveControls\setChecked properties can be changed during a callback.
Class hierarchy
- \Prado\Web\UI\ActiveControls\TActiveCheckBox implements IActiveControl, ICallbackEventHandler
- \Prado\Web\UI\WebControls\TCheckBox implements IPostBackDataHandler, IValidatable, IDataRenderer, ISurroundable
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.1
public
|
__construct() : mixed
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.
|
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
|
raiseCallbackEvent(TCallbackEventParameter $param) : mixed
Raises the callback event. This method is required by {@see
ICallbackEventHandler} interface.
This method is mainly used by framework and control developers. |
public
|
setChecked(bool $value) : mixed
Sets a value indicating whether the checkbox is to be checked or not.
Updates checkbox checked state on the client-side if the \Prado\Web\UI\ActiveControls\setEnableUpdate property is set to true. |
public
|
setText(string $value) : mixed
Updates the button text on the client-side if the
{@see setEnableUpdate EnableUpdate} property is set to true.
|
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
|
protected
|
|
protected
|
renderClientControlScript(mixed $writer) : mixed
Override parent implementation, no javascript is rendered here instead
the javascript required for active control is registered in {@see addAttributesToRender}.
|
protected
|
renderInputTag(THtmlWriter $writer, string $clientID, string $onclick) : mixed
Ensure that the ID attribute is rendered and registers the javascript code
for initializing the active control.
Since 3.1.4, the javascript code is not rendered if \Prado\Web\UI\ActiveControls\setAutoPostBack is false |
protected
|
renderLabel(THtmlWriter $writer, string $clientID, string $text) : mixed
Renders a label beside the checkbox.
|