|
Hi,
How can use a hashMap in select box with Map key as listkey and Map values one of the property as listValue. For example I have a Map of type <String,Person> . In the listValue I want to provide person.name. Is this possible? Regards, Shrinivas |
|
I think it requires list. So you can get values from hashmap using values() method.then apply person.name.
Regards, Rakesh -----Original Message----- From: Shrinivas Parashar [mailto:[hidden email]] Sent: Wednesday, March 28, 2012 3:44 PM To: Struts Users Mailing List Subject: Using HashMap in selectbox Hi, How can use a hashMap in select box with Map key as listkey and Map values one of the property as listValue. For example I have a Map of type <String,Person> . In the listValue I want to provide person.name. Is this possible? Regards, Shrinivas DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
i think you can turn the map to a Set<Entry<K, V>> then use it as listKey
as "getKey()" or "key" and listValue as "getValue()" or "value" On Wed, Mar 28, 2012 at 6:16 PM, Rakeshkumar Parmar < [hidden email]> wrote: > I think it requires list. So you can get values from hashmap using > values() method.then apply person.name. > > > Regards, > Rakesh > > -----Original Message----- > From: Shrinivas Parashar [mailto:[hidden email]] > Sent: Wednesday, March 28, 2012 3:44 PM > To: Struts Users Mailing List > Subject: Using HashMap in selectbox > > Hi, > How can use a hashMap in select box with Map key as listkey and Map values > one of the property as listValue. > For example I have a Map of type <String,Person> . In the listValue I want > to provide person.name. Is this possible? > > Regards, > Shrinivas > > DISCLAIMER > ========== > This e-mail may contain privileged and confidential information which is > the property of Persistent Systems Ltd. It is intended only for the use of > the individual or entity to which it is addressed. If you are not the > intended recipient, you are not authorized to read, retain, copy, print, > distribute or use this message. If you have received this communication in > error, please notify the sender and delete all copies of this message. > Persistent Systems Ltd. does not accept any liability for virus infected > mails. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > |
| Powered by Nabble | Edit this page |
