Maybe with this : <s:iterator id="locale" value="eventOverride.descriptionOverride.localisedMessages"> <s:textfield id="%{key}" name="eventOverride.descriptionOverride.localisedMessages['%{key}'] " value="%{value}"></s:textfield> </s:iterator>
Julien -----Message d'origine----- De : David Loup [mailto:[EMAIL PROTECTED] Envoyé : lundi 25 février 2008 13:53 À : Struts Users Mailing List Objet : RE: Access value of a map inside an iterator Hello, After a bit of refactoring, I'm quite happy iterating over the map and displaying keys and values. My problem is, how do I have to name the property so that the map value actually gets passed to the Action? Currently I'm doing something like this: <s:iterator id="locale" value="eventOverride.descriptionOverride.localisedMessages"> <s:textfield id="%{key}" name="eventOverride.descriptionOverride.localisedMessages[%{key}] " value="%{value}"></s:textfield> </s:iterator> That's inside a form that I want to use to edit the contents of the map. But it puts only empty values in the map (as keys and values). -----Original Message----- From: David Loup Sent: 22 February 2008 17:45 To: Struts Users Mailing List Subject: RE: Access value of a map inside an iterator Hi Dave, Thanks for your reply, but that's not exactly what I'm trying to do. I don't want to iterate over the map, but over another collection (my "allKeys", which is for example a List). For each value inside that list, I want to get the corresponding value from the map. E.g: allKeys = {"Foo","Bar","Bob"} theMap = {<"Foo","FooValue">,<"Bob","BobValue">,<"Bar","BarValue">} So I want to iterate over allKeys, and for each value, retrieve the "*Value" strings. -----Original Message----- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 22 February 2008 17:40 To: Struts Users Mailing List Subject: Re: Access value of a map inside an iterator --- David Loup <[EMAIL PROTECTED]> wrote: > <s:iterator id="theKey" value="allKeys"> > <s:property value="map[theKey]" /> > </s:iterator> <s:iterator value="theMap"> <s:property value="key"/> => <s:property value="value"/> <br/> </s:iterator> or <s:iterator value="theMap" id="foo"> <s:property value="#foo.key"/> => <s:property value="#foo.value"/> <br/> </s:iterator> Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ________________________________________________________________________ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient's responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ________________________________________________________________________ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient's responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, any attachments and the information contained therein ("this message") are confidential and intented solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited. ---------------------------------------------------------------------------------------- Ce message electronique et tous les fichiers joints ainsi que les informations contenues dans ce message (ci apres "le message"), sont confidentiels et destines exclusivement a l'usage de la personne a laquelle ils sont adresses. Si vous avez recu ce message par erreur, merci de le renvoyer a son emetteur et de le detruire. Toute diffusion, publication, totale ou partielle ou divulgation sous quelque forme que ce soit non expressement autorisees de ce message, sont interdites. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]