You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Bredesen <ch...@expnews.com> on 2004/10/06 21:56:45 UTC

backed by a Map with no entrySet

Hello all,

I'm attempting to wrap a pseudo-enum in a Map that provides displayable
values for the enum keys.  Basically, I need I18N'd pretty values for my
select options which return the enum's string representation.  The
pretty values can be looked up in a resource bundle by
<some_prefix>.enumValue.  So I have constructed some manner of Adapter
Map that wraps the enum and does the resource lookup on get().

This doesn't seem to plug into html:options[Collection] because there is
no entrySet.  The Map works fine when I iterate over it using an
Iterator to obtain the keys, but it seems that Struts wants an entrySet
with Map.Entry objects inside.  These do not exist because I'm looking
up the actual values during the Map.get(key).

Am I missing something or am I just going about this entirely the wrong
way?

Thanks,

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org