Bug 26914 - not value created in option list if value is equal to key
Summary: not value created in option list if value is equal to key
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Input Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-02-13 13:52 UTC by Massimo Ferrario
Modified: 2005-03-20 17:06 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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).