I have a form with some fields binded with spring velocity macros:
#springFormInput("model.email", "required email='true' maxlength='100'")
#springFormInput("model.name", "required maxlength='100'")
...
I want to bind a DropDown to a value, and set the OPTIONS of that DropDown to be a value on my model, like:
public class MyDto {
private String email;
private String name;
private String dropdownValue;
private List<String> dropdownOptions;
...
}
And my view goes with:
#springFormInput("model.email", "required email='true' maxlength='100'")
#springFormInput("model.name", "required maxlength='100'")
#springFormSingleSelect("model.dropdownValue", "dropdownOptions", "required")
...
It's not working. The list comes without values. How can i do that?