Class \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 \Prado\Web\UI\WebControls\setSelectionMode is TListSelectionMode::Multiple. It takes single selection only if Single. The property \Prado\Web\UI\WebControls\setRows specifies how many rows of options are visible at a time. See 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 <com:TListItem Attributes.Group="Group Name" .../> in template
Class hierarchy
- \Prado\Web\UI\WebControls\TListBox implements IPostBackDataHandler, IValidatable
- \Prado\Web\UI\WebControls\TListControl implements IDataRenderer
- \Prado\Web\UI\WebControls\TDataBoundControl
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
getDataChanged() : bool
Returns a value indicating whether postback has caused the control data change.
This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. |
public
|
|
public
|
|
public
|
|
public
|
getValidationPropertyValue() : string
Returns the value to be validated.
This methid is required by \Prado\Web\UI\IValidatable interface. |
public
|
loadPostData(string $key, array<string|int, mixed> $values) : bool
Loads user input data.
This method is primarly used by framework developers. |
public
|
onPreRender(mixed $param) : mixed
Registers the list control to load post data on postback.
This method overrides the parent implementation. |
public
|
raisePostDataChangedEvent() : mixed
Raises postdata changed event.
This method is required by IPostBackDataHandler interface. It is invoked by the framework when \Prado\Web\UI\WebControls\getSelectedIndices property is changed on postback. This method is primarly used by framework developers. |
public
|
|
public
|
|
public
|
|
protected
|
addAttributesToRender(THtmlWriter $writer) : mixed
Adds attribute name-value pairs to renderer.
This method overrides the parent implementation with additional list box specific attributes. |
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
This method overrides the parent implementation. |
protected
|