Class \Prado\Web\UI\ActiveControls\TActiveButton
TActiveButton is the active control counter part to TButton.
When a TActiveButton is clicked, rather than a normal post back request a callback request is initiated.
The \Prado\Web\UI\ActiveControls\onCallback event is raised during a callback request and it is raise after the \Prado\Web\UI\ActiveControls\onClick event.
When the \Prado\Web\UI\ActiveControls\TBaseActiveCallbackControl::setEnableUpdate property is true, changing the \Prado\Web\UI\ActiveControls\setText property during callback request will update the button's caption upon callback response completion.
Class hierarchy
- \Prado\Web\UI\ActiveControls\TActiveButton implements IActiveControl, ICallbackEventHandler
- \Prado\Web\UI\WebControls\TButton implements IPostBackEventHandler, IButtonControl, IDataRenderer
- \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
|
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 \Prado\Web\UI\ActiveControls\ICallbackEventHandler} interface. If {@see getCausesValidation CausesValidation}
is true, it will invoke the page's {@see \Prado\Web\UI\TPage::validate validate}
method first. It will raise {@see onClick OnClick} event first
and then the {@see onCallback OnCallback} event.
This method is mainly used by framework and control developers. |
public
|
setText(string $value) : mixed
Updates the button text on the client-side if the
{@see setEnableUpdate EnableUpdate} property is set to true.
|
protected
|
addAttributesToRender(mixed $writer) : mixed
Ensure that the ID attribute is rendered and registers the javascript code
for initializing the active control.
|
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
|
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}.
|