jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24850] New: - select keys and values inversion
Date Thu, 20 Nov 2003 09:51:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24850>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24850

select keys and values inversion

           Summary: select keys and values inversion
           Product: Taglibs
           Version: 1.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Input Taglib
        AssignedTo: taglibs-dev@jakarta.apache.org
        ReportedBy: pgadeyne@yahoo.fr


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");

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message