Bug 26914

Summary: not value created in option list if value is equal to key
Product: Taglibs Reporter: Massimo Ferrario <m.ferrario>
Component: Input TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Massimo Ferrario 2004-02-13 13:52:07 UTC
this is the problem:
I  created a Map of number; every key is equal to value.
Using this map inside the <input:select> tag I saw that no values are created.
Looking at the tablib source code I have noticed that there is an explicit line 
of code (approx line 222 of org.apache.taglibs.input.java) where test if key 
equals value, in this cause value is not written.
This, in my opinion, could generate problem if there is, in jsp page, a 
javascript validation funciont related to select box. 
No problem, instead, if I submit the form without validation.

This is a piece of my code:

Map m = new Hashtable();

<input:select name="choice" options="<%= m %>"/>

Thanks in advance for suggestion to solve this problem.
Comment 1 Karl von Randow 2004-10-26 23:15:09 UTC
Sorry for the extremely slow response. This has been fixed and committed to 
the CVS. The value will now be output unless no value is provided (ie. null, 
or missing value attribute on input:option tag).