The doc for the "options" attribute of the select tag says: "options map for select. The key is the option value and the value is the option label.". But with this code <input:select name="select1" options="<%= optMap %>" /> give the following result: <select name="select1"> <option value="Label1">key1</option> <option value="Label2">key2</option> </select> Which is not what I was expecting. A second test with this code: <input:select name="select2" optionLabels="<%= new java.util.Vector(optMap.values()) %>" optionValues="<%= new java.util.Vector(optMap.keySet()) %>" /> give a different results, which for me should be the default result. Am I missing something? Because I would be quite surprised to be the first to note such a visible bug. For info here is the map I used: TreeMap optMap = new TreeMap(); optMap.put("key1", "Label1"); optMap.put("key2", "Label2");
You're right - the documentation is wrong. It is in fact Map key => option label, Map value => option value. I have updated the documentation to reflect the actual implementation. I'm not sure whether I feel that the implementation is the right-way-around, however in the interests of compatibility I don't see a problem leaving it with the current implementation.