G'day,

Ummmmmm, this returns the value associated with the key... I need to do the
opposite whereby I have the value and I need it's key.

Thanks.
AB

-----Original Message-----
From: Tim Troy [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 9 October 2004 10:33 PM
To: [EMAIL PROTECTED]
Subject: FW: [JSTL] Retrieving the key from a LinkedMap for a known value?


I have a bean with a HashMap named errorCodes.  To access a key using jstl,
I do the following:

<c:out value="${bean.errorCodes['categoryId']}"></c:out>

-----Original Message-----
From: Adrian Beech [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 09, 2004 1:59 AM
To: 'Tag Libraries Users List'
Subject: [JSTL] Retrieving the key from a LinkedMap for a known value?


G'day all,

Is it possible to retrieve the key from a LinkedMap for a known value using
the expression language syntax under JSTL 1.0?

For example, I have a LinkedMap object which is being used to generate a
drop down with the <input:select .../> tag from the Input taglib.  Apart
from needing the value selected by the user from the drop down I need to
pull the corresponding key for display purposes on the next page along in
the food chain.  As I've already got the key/value pairs in a LinkedMap
within the session context I was hoping to merely say "well here is the
value from the drop down now give me the key which was used as the display
text for that drop down".  

Does this sort of make sense?

AB


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__________ NOD32 1.889 (20041008) Information __________

This message was checked by NOD32 antivirus system. http://www.nod32.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to