2009 NEWS 2009-08-31 - NEW EXAMPLE: setNodeValue on Multi-select
The new setNodeValue on Multi-select example demonstrates how the setNodeValue
instance method of the Uize.Widget
base class can be used to conveniently set the value of a multi-select select tag (i.e. where its multiple
attribute is set to the value 'multiple'
).
In this example, a multi-select form element lets you choose from a number of different types of renewable energy. A row of buttons above the select element lets you select different combinations of options. Clicking on any of the buttons has the effect of calling the setNodeValue
method. Buttons are also provided for selecting all and selecting none, which call the setNodeValue
method with special values. The special value ''
(empty string) clears the selection, and the special wildcard value '*'
selects all options. Under the select element is a display of some of its state that is kept up-to-date.