How do I select an option using Spring's form:select tag?
- by Dave
I'm using Spring 3.1.1.RELEASE. Using the form:select tag, how do I specify which option should be selected? I want the first one to be selected, but when I put
<form:select path="parentOrganization">
<form:option value="" label="Select an Org Type or Parent Org" />
<form:options items="${orgTypesWoParents}" itemValue="id" itemLabel="description" />
<form:option value="" label="=======================" />
</form:select>
the last one is selected. I want to preserve the order of how everything is displayed, which is why I've arranged things in this way.