Velocity Macro - Select List
Code:
#**
* springFormSingleSelect
*
* Show a selectbox (dropdown) input element allowing a single value to be chosen
* from a list of options.
*
* @param path the name of the field to bind to
* @param options a list (sequence) of all the available options
* @param attributes any additional attributes for the element (such as class
* or CSS styles or size
*#
#macro( springFormSingleSelect $path $options $attributes )
#springBind($path)
<select name="${status.expression}" ${attributes}>
#foreach($option in $options)
<option
#if($status.value && $status.value == $option)
selected="true"
#end>
${option}</option>
#end
</select>
#end
How does the value attribute in the <OPTION> tag get populated?
e.g.
<select name="states">
....
<option value="FL">Florida</OPTION>
....
</select>
:?: