PHP Class Prado\Web\UI\ActiveControls\TActiveListBox

List items can be added dynamically during a callback request.
Since: 3.1
Inheritance: extends Prado\Web\UI\WebControls\TListBox, implements Prado\Web\UI\ActiveControls\IActiveControl, implements Prado\Web\UI\ActiveControls\ICallbackEventHandler
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
__construct ( ) Creates a new callback control, sets the adapter to TActiveListControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
getActiveControl ( ) : TBaseActiveCallbackControl
getClientSide ( ) : TCallbackClientSide
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.
onPreRender ( $param ) Updates the client-side options if the item list has changed after the OnLoad event.
raiseCallbackEvent ( $param ) Raises the callback event. This method is required by {@link ICallbackEventHandler} interface.
setSelectionMode ( $value ) Sets the selection mode of the list control (Single, Multiple) on the client-side if the {@link setEnableUpdate EnableUpdate} property is set to true.

Méthodes protégées

Méthode Description
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
createListItemCollection ( ) : TActiveListItemCollection Creates a collection object to hold list items. A specialized TActiveListItemCollection is created to allow the drop down list options to be added.
getClientClassName ( ) : null Javascript client class for this control.
renderClientControlScript ( $writer ) Override parent implementation, no javascript is rendered here instead the javascript required for active control is registered in {@link addAttributesToRender}.

Method Details

__construct() public méthode

Creates a new callback control, sets the adapter to TActiveListControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
public __construct ( )

addAttributesToRender() protected méthode

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
protected addAttributesToRender ( $writer )

createListItemCollection() protected méthode

This method may be overriden to create a customized collection.
protected createListItemCollection ( ) : TActiveListItemCollection
Résultat TActiveListItemCollection the collection object

getActiveControl() public méthode

public getActiveControl ( ) : TBaseActiveCallbackControl
Résultat TBaseActiveCallbackControl standard callback control options.

getClientClassName() protected méthode

This method overrides the parent implementation.
protected getClientClassName ( ) : null
Résultat null no javascript class name.

getClientSide() public méthode

public getClientSide ( ) : TCallbackClientSide
Résultat TCallbackClientSide client side request options.

onCallback() public méthode

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 )

onPreRender() public méthode

Updates the client-side options if the item list has changed after the OnLoad event.
public onPreRender ( $param )

raiseCallbackEvent() public méthode

This method is mainly used by framework and control developers.
public raiseCallbackEvent ( $param )

renderClientControlScript() protected méthode

Override parent implementation, no javascript is rendered here instead the javascript required for active control is registered in {@link addAttributesToRender}.
protected renderClientControlScript ( $writer )

setSelectionMode() public méthode

Sets the selection mode of the list control (Single, Multiple) on the client-side if the {@link setEnableUpdate EnableUpdate} property is set to true.
public setSelectionMode ( $value )