mvc:annotation-driven seems to be adding converters which convert a collection to a string. Because of this some spring velocity macros (springFormMultiSelect and springFormCheckboxes) dont work as expected, since the macro's depend on bindstatus.getvalue being a collection. (selected options won't be displayed as such) See the following macro:
When replacing $status.value with $status.actualValue it works as expected.. Is this a bug?Code:#macro( springFormMultiSelect $path $options $attributes ) #springBind($path) <select multiple="multiple" id="${status.expression}" name="${status.expression}" ${attributes}> #foreach($option in $options.keySet()) <option value="${option}" #foreach($item in $status.value) #if($item == $option) selected="selected" #end #end >${options.get($option)}</option> #end </select> #end


Reply With Quote
