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

TDropDownList displays a dropdown list on a Web page. It inherits all properties and events from {@link TListControl}. Since v3.0.3, TDropDownList 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 Since v3.1.1, TDropDownList starts to support prompt text. That is, a prompt item can be displayed as the first list item by specifying either {@link setPromptText PromptText} or {@link setPromptValue PromptValue}, or both. Choosing the prompt item will unselect the TDropDownList. When a prompt item is set, its index in the list is set to -1. So, the {@link getSelectedIndex SelectedIndex} property is not affected by a prompt item: the items list will still be zero-based. The {@link clearSelection clearSelection} method will select the prompt item if existing, otherway the first available item in the dropdown list will be selected.
С версии: 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.
getValidationPropertyValue ( ) : mixed Returns the value to be validated.
loadPostData ( $key, $values ) : boolean Loads user input data.
raisePostDataChangedEvent ( ) Raises postdata changed event.
setIsValid ( $value )
setSelectedIndices ( $indices )

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

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

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

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

Adds attributes to renderer.
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.

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

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

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

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

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

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

public setIsValid ( $value )

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

public setSelectedIndices ( $indices )