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
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
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 )