Class \Prado\Web\UI\ActiveControls\TActiveRadioButton
The active control counter part to radio button. The \Prado\Web\UI\ActiveControls\setAutoPostBack property is set to true by default. Thus, when the radio button 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.
The \Prado\Web\UI\ActiveControls\setGroupName property may NOT be changed during callback because the client-side name attribute is read-only and can not be changed using javascript.
Class hierarchy
- \Prado\Web\UI\ActiveControls\TActiveRadioButton implements IActiveControl, ICallbackEventHandler
- \Prado\Web\UI\WebControls\TRadioButton
- \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
Checks the radio button.
Updates radio button 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(mixed $writer, mixed $clientID, mixed $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 radio button.
|