JAVASCRIPT EXAMPLES Options
In this example, the markup for an options widget is being wired up by an instance of Uize.Widget.Options
. Below the options are some links that execute snippets of code to demonstrate the programmatic interface of the widget. The Uize.Widget.Options
class provides value
and tentativeValue
state properties in its interface. The Changed.value
and Changed.tentativeValue
instance events for these two properties can be used to watch for changes in the widget's state. The value
state property can be set to programmatically change the selected option. Interact with both the options UI and the test links to see how they affect one another.
SOLAR
|
WIND
|
GEOTHERMAL
|
EFFICIENCY
|
TIDAL
|
options.get ('value') == ''
options.get ('tentativeValue') == ''
Set the value for the options widget: options.set ({value:'solar'}) , options.set ({value:'wind'}) , options.set ({value:'geothermal'}) , options.set ({value:'efficiency'}) , options.set ({value:'tidal'})