STPHPObject | --STPHPComponent | --STPHPListbox
Located in File: Program_Root/stphplistbox.php
stphplib
Roberto Gerola <roberto.gerola@speedtech.it>
0.8
Class Variable Summary |
$elements
The list of elements of the listbox Default Value:
|
Inherited Class Variable Summary | |||||||||||||||
Inherited From Class STPHPComponent
|
|||||||||||||||
Inherited From Class STPHPObject
|
Inherited Method Summary | ||||||||||||||||||||||||||||||||||||||
Inherited From Class STPHPComponent
|
||||||||||||||||||||||||||||||||||||||
Inherited From Class STPHPObject
|
Method Summary |
STPHPEdit constructor STPHPListbox ( $name )
Creates the object |
void addElement ( $key, $value, [$selected = FALSE] )
Add an element at the listbox |
void clearElements ( )
Clears the list of elements |
void dtor ( )
Destructor |
void loadFromDb ( &$db, $key_col, $val_col, $sql )
Load the elements from a db |
void selectElementByKey ( $key )
Select an element by its key |
void selectElementByValue ( $value )
Select an element by its value |
void setConfiguration ( &$configuration )
|
string write ( )
Designs the object at runtime |
Variable Detail |
private
Method Detail |
STPHPEdit constructor STPHPListbox ( $name )
Creates the object- string $name:
public
void addElement ( $key, $value, [$selected = FALSE] )
Add an element at the listbox- string $key: the key of the element
- string $value: the value of the element
- bool $selected: the element is selected or not
public
void clearElements ( )
Clears the list of elementspublic
void dtor ( )
Overrides: STPHPComponent::dtor()
DestructorDestroys all the resources associated with the object
public
void loadFromDb ( &$db, $key_col, $val_col, $sql )
Load the elements from a db- string &$db: the db instance
- string $key_col: the column that containes the keys
- string $val_col: the column that containes the value
- string $sql: the sql that extracts the elements
public
void selectElementByKey ( $key )
Select an element by its key- string $key: the key of the element
public
void selectElementByValue ( $value )
Select an element by its value- string $value: the value of the element
public
void setConfiguration ( &$configuration )
Overrides: STPHPComponent::setConfiguration()
string write ( )
Overrides: STPHPComponent::write()
Designs the object at runtimeAvailable attributes : - VISIBLE : defines if the component must be designed or not - NAME : defines the name of the form (if empty $name of the object is used) - READONLY : if 'TRUE' the control is readonly - DISABLED : if 'TRUE' the control is disabled - MULTIPLE: if 'TRUE' the multi selection is enabled - SIZE: the number of rows showed - ONCHANGE : defines the onchange event hook - CLASS : defines the CSS class
the code that represents the object at runtime
private