This should be very basic but I can\'t find anything about it in the web, just bits and pieces that I don\'t seem able to fit together..
We\'re using Spring MVC with
After much rephrasing and rethinking I finally discovered the solution:
First
I need to have a bean hold my choice obviously
Second
The options need to be initialized as a String list and provided by Spring MVC to the page:
public ModelAndView get() {
// ...
ModelAndView mav = new ModelAndView();
List options = Arrays.asList(getOptionsFromDatabaseAndConvertToStringList());
mav.addObject("options",options );
mav.setViewName("someview");
return mav;
}
Third
options now need to be bound in the freemarker template and can then be accessed like any other freemarker variable (i.e. NO quotation marks):
<@spring.bind "options" />