tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick>
Subject Re: continued question on using an Integer from a Map
Date Thu, 17 Jul 2003 14:22:16 GMT
On Thu, 2003-07-17 at 09:56, Michael Duffy wrote:
> The java.util.Map only takes Objects as keys and
> values.  If you've got an int that you want to use as
> the key to get a value out of your Map, you'll have to
> wrap it as a java.lang.Integer first.

I understand that:) What in my e-mail led you to think I was trying to
use an int vs Integer?
> <c:out value="Here's the value you ordered:
> ${users.get[key]}"/>
> But it's not working.  Unless the EL can handle
> passing an Object to a Map, I don't know a way to do
> what you're asking.  The int-to-String is the only
> workaround that I'm aware of. - MOD

Ok, that's what I wanted to know (and what I was afraid of:).

I guess if I really cared I could modify the tag to an additional
parameter such as class-type so I can let the tag know whether the key
to be looked up should be cast to an Integer from the String
representation that is being passed to the tag evaluation.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message