Dom_FormElement
|
+--Dom_FormSelect
public class Dom_FormSelect
extends Dom_FormElement
| Fields inherited from Dom_FormElement | |
|---|---|
| element, form | |
| Method Summary | |
|---|---|
| DOMElement | appendOptGroup(mixed label, string optGroup, string The) Append an 'OptGroup' to the base node or the optGroup |
| DOMElement | appendOption(mixed text, mixed value, string optGroup, string The) Append an 'Option' to this 'Select' objectIf no value is supplied the text parameter is used as the value. |
| void | Clear all selected elements |
| private DOMElement | clearSelectedFunction(DOMElement node, string name) Find the opt group node with the name |
| void | enableMultiple(boolean b) Set the select list to handle multiple selections NOTE: When multiple is dissabled and multiple elements are selected it behaviour is unknown and browser specific. |
| DOMElement | findOptGroup(DOMElement node, string name) Find the opt group node with the name |
| DOMElement | findOption(DOMElement node, string value) Find an option node |
| array | findSelected(DOMElement node) Find the selected values to this select box |
| mixed | getValue() Return the selected value, Will return an array if multiple select is enabled. |
| boolean | Return if this is a multiple select or not. |
| boolean | optGroupExists(string name) Check if the opt group exists |
| void | Clear this 'select' element of all its 'option' elements. |
| void | setValue(string value) Set the selected value of the form element |
| void | useTextNodes(boolean b) Use Text Nodes, Set to True by default |
| Methods inherited from Dom_FormElement | |
|---|---|
| disable, getAttribute, getForm, getName, getNode, getTemplate, getType, getValue, isDisabled, setAttribute, setName, setValue | |
public DOMElement appendOptGroup(mixed label, string optGroup, string The)
Append an 'OptGroup' to the base node or the optGroup
public DOMElement appendOption(mixed text, mixed value, string optGroup, string The)
Append an 'Option' to this 'Select' object
If no value is supplied the text parameter is used as the value.
NOTE: Ensure no comment nodes are in the select's node tree.
public void clearSelected()
Clear all selected elements
private DOMElement clearSelectedFunction(DOMElement node, string name)
Find the opt group node with the name
public void enableMultiple(boolean b)
Set the select list to handle multiple selections NOTE: When multiple is dissabled and multiple elements are selected it behaviour is unknown and browser specific.
public DOMElement findOptGroup(DOMElement node, string name)
Find the opt group node with the name
public DOMElement findOption(DOMElement node, string value)
Find an option node
public array findSelected(DOMElement node)
Find the selected values to this select box
public mixed getValue()
Return the selected value, Will return an array if multiple select is enabled.
public boolean isMultiple()
Return if this is a multiple select or not.
public boolean optGroupExists(string name)
Check if the opt group exists
public void removeOptions()
Clear this 'select' element of all its 'option' elements.
public void setValue(string value)
Set the selected value of the form element
public void useTextNodes(boolean b)
Use Text Nodes, Set to True by default
A class that handle a forms select element.