SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatOptionControl
└─SwatFlydown
public class SwatFlydown
extends SwatOptionControl
| Field Summary | |
|---|---|
| string | Blank title. |
| boolean | Show a blank option. |
| string | Flydown value. |
| Fields inherited from Swat.SwatOptionControl | |
|---|---|
| options, serialize_values | |
| Fields inherited from Swat.SwatInputControl | |
|---|---|
| required | |
| Method Summary | |
|---|---|
| void | addDivider(string title) Adds a divider to this flydown. |
| void | display() Displays this flydown. |
| protected void | displaySingle(mixed flydown_option) Displays this flydown if there is only a single option. |
| protected array | Gets the array of CSS classes that are applied to this flydown. |
| string | Gets the id attribute of the XHTML element displayed by this widget that should receive focus. |
| boolean | getState() Gets the current state of this flydown. |
| void | process() Figures out what option was selected. |
| protected boolean | Processes the value of this flydown from user-submitted form data. |
| void | reset() Resets this flydown. |
| void | setState(boolean state) Sets the current state of this flydown. |
| Methods inherited from Swat.SwatOptionControl | |
|---|---|
| addOption, addOptionsByArray, getOption, getOptions, getOptionsByValue, removeOption, removeOptionsByValue | |
| Methods inherited from Swat.SwatInputControl | |
|---|---|
| getForm, init | |
| Methods inherited from Swat.SwatControl | |
|---|---|
| addMessage, getNote, printWidgetTree | |
| Methods inherited from Swat.SwatWidget | |
|---|---|
| addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer | |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public string $blank_title = ''
Blank title
The user visible title to display in the blank field.
public boolean $show_blank = true
Show a blank option
Whether or not to show a blank value at the top of the flydown.
public string $value = null
Flydown value
The index value of the selected option, or null if no option is selected.
public void addDivider(string title)
Adds a divider to this flydown
A divider is an unselectable flydown option.
title - the title of the divider. Defaults to two em dashes.public void display()
Displays this flydown
Displays this flydown as a XHTML select.
protected void displaySingle(mixed flydown_option)
Displays this flydown if there is only a single option
protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this flydown
public string getFocusableHtmlId()
Gets the id attribute of the XHTML element displayed by this widget that should receive focus
public boolean getState()
Gets the current state of this flydown
public void process()
Figures out what option was selected
Processes this widget and figures out what select element from this flydown was selected. Any validation errors cause an error message to be attached to this widget in this method.
protected boolean processValue()
Processes the value of this flydown from user-submitted form data
public void reset()
Resets this flydown
Resets this flydown to its default state. This method is useful to call from a display() method when form persistence is not desired.
public void setState(boolean state)
Sets the current state of this flydown
state - the new state of this flydown.
A flydown (aka combo-box) selection widget