Hey Paul,

Thanks for this.  I've been integrating it, and have actually re- 
parented the tag to OptionsCollection as this allows it to re-use a  
lot of code, and benefit from the sorting capabilities.

I do have one question for you though.  Is there a reason you chose  
to use:
   map key == option value
   map value == option label

I had to think long and hard to come up with a reason one way or the  
other, but having thought about it I think I'd reverse the two to have:
   map key == option label
   map value == option value

Apart from being a bit more obvious (value == value), the latter  
arrangement allows you to have the same value for multiple labels  
(e.g. Blue -> Blue, Navy -> Blue) whereas the former arrangement  
allows you to have multiple values for the same label (e.g. Blue ->  
Blue, Blue -> Navy) - which seems like it could get very confusing.

Thoughts?

-t

On Oct 14, 2006, at 3:48 PM, Paul Barry (JIRA) wrote:

>      [ http://mc4j.org/jira/browse/STS-157?page=all ]
>
> Paul Barry updated STS-157:
> ---------------------------
>
>     Attachment: STS-157.diff
>
> Here's a patch for InputOptionsMapTag
>
>> Add an InputOptionsMapTag
>> -------------------------
>>
>>                 Key: STS-157
>>                 URL: http://mc4j.org/jira/browse/STS-157
>>             Project: Stripes
>>          Issue Type: New Feature
>>          Components: Tag Library
>>            Reporter: Jeppe Cramon
>>         Assigned To: Tim Fennell
>>            Priority: Minor
>>             Fix For: Release 1.5
>>
>>         Attachments: STS-157.diff
>>
>>
>> It would be great with an completing InputOptionsMapTag which can  
>> take a map and print out as options.
>> It should support localization (like the other OptionsTags) and  
>> also support sorting (would be nice on the other tags as well).
>> /Jeppe
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators: http://mc4j.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/ 
> software/jira
>
>
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Stripes-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-development


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to