PHP Класс Prado\Web\UI\WebControls\TListBox

TListBox displays a list box on a Web page that allows single or multiple selection. The list box allows multiple selections if {@link setSelectionMode SelectionMode} is TListSelectionMode::Multiple. It takes single selection only if Single. The property {@link setRows Rows} specifies how many rows of options are visible at a time. See {@link TListControl} for inherited properties. Since v3.0.3, TListBox starts to support optgroup. To specify an option group for a list item, set a Group attribute with it, $listitem->Attributes->Group="Group Name"; or in template
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TListControl, implements Prado\Web\UI\IPostBackDataHandler, implements Prado\Web\UI\IValidatable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getDataChanged ( ) : boolean Returns a value indicating whether postback has caused the control data change.
getIsValid ( ) : boolean Returns true if this control validated successfully.
getRows ( ) : integer
getSelectionMode ( ) : TListSelectionMode
getValidationPropertyValue ( ) : mixed Returns the value to be validated.
loadPostData ( $key, $values ) : boolean Loads user input data.
onPreRender ( $param ) Registers the list control to load post data on postback.
raisePostDataChangedEvent ( ) Raises postdata changed event.
setIsValid ( $value )
setRows ( $value )
setSelectionMode ( $value )

Защищенные методы

Метод Описание
addAttributesToRender ( $writer ) Adds attribute name-value pairs to renderer.
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getIsMultiSelect ( ) : boolean

Описание методов

addAttributesToRender() защищенный Метод

This method overrides the parent implementation with additional list box specific attributes.
protected addAttributesToRender ( $writer )

getClientClassName() защищенный Метод

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Результат string the javascript class name

getDataChanged() публичный Метод

This method is required by the \Prado\Web\UI\IPostBackDataHandler interface.
public getDataChanged ( ) : boolean
Результат boolean whether postback has caused the control data change. False if the page is not in postback mode.

getIsMultiSelect() защищенный Метод

protected getIsMultiSelect ( ) : boolean
Результат boolean whether this control allows multiple selection

getIsValid() публичный Метод

Defaults to true.
public getIsValid ( ) : boolean
Результат boolean wether this control validated successfully.

getRows() публичный Метод

public getRows ( ) : integer
Результат integer the number of rows to be displayed in the list control

getSelectionMode() публичный Метод

public getSelectionMode ( ) : TListSelectionMode
Результат TListSelectionMode the selection mode (Single, Multiple). Defaults to TListSelectionMode::Single.

getValidationPropertyValue() публичный Метод

This methid is required by \Prado\Web\UI\IValidatable interface.
public getValidationPropertyValue ( ) : mixed
Результат mixed the value of the property to be validated.

loadPostData() публичный Метод

This method is primarly used by framework developers.
public loadPostData ( $key, $values ) : boolean
Результат boolean whether the data of the component has been changed

onPreRender() публичный Метод

This method overrides the parent implementation.
public onPreRender ( $param )

raisePostDataChangedEvent() публичный Метод

This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. It is invoked by the framework when {@link getSelectedIndices SelectedIndices} property is changed on postback. This method is primarly used by framework developers.

setIsValid() публичный Метод

public setIsValid ( $value )

setRows() публичный Метод

public setRows ( $value )

setSelectionMode() публичный Метод

public setSelectionMode ( $value )