Creates a
select
element and its
option
s based on the
dataSource
. If the
dataSource
elements are complex objects (ie not string or primitives), supply the parameters
value
and
text
to the dictionary to make the helper use the specified properties to extract the
option
value and content respectively.
You can also specify the attribute firstoption
to force the first option be something like 'please select'. You can set the value of firstoption
by specifying the attribute firstoptionvalue
. The default value is '0'.
Usually the target
is a single value and the dataSource
is obviously a set with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix
parameters on the attributes
as it would not be inferred.
The target can also be a set. In this case the intersection will be the initially selected elements.