Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 43882 invoked from network); 19 Feb 2008 20:53:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2008 20:53:00 -0000 Received: (qmail 11585 invoked by uid 500); 19 Feb 2008 20:52:45 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 11559 invoked by uid 500); 19 Feb 2008 20:52:45 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 11548 invoked by uid 99); 19 Feb 2008 20:52:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2008 12:52:45 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.215.144.44] (HELO GVLSCEXC5.CORPORATE.VOX.NET) (216.215.144.44) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 19 Feb 2008 20:52:11 +0000 Received: From EMAIL01.CORPORATE.VOX.NET ([10.1.18.51]) by GVLSCEXC5.CORPORATE.VOX.NET (WebShield SMTP v4.5 MR2); id 1203454338231; Tue, 19 Feb 2008 15:52:18 -0500 Received: from 10.3.23.45 ([10.3.23.45]) by EMAIL01.CORPORATE.VOX.NET ([10.1.18.53]) with Microsoft Exchange Server HTTP-DAV ; Tue, 19 Feb 2008 20:52:17 +0000 User-Agent: Microsoft-Entourage/12.0.0.071130 Date: Tue, 19 Feb 2008 15:52:17 -0500 Subject: Re: S2 NESTED iterators & FLAT HashMaps: From: Randy Burgess To: Struts Users Mailing List Message-ID: Thread-Topic: S2 NESTED iterators & FLAT HashMaps: Thread-Index: AchzOU/YeZYs/4IXeESgvEQyT4fp1Q== In-Reply-To: <15561558.post@talk.nabble.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-NAIMIME-Disclaimer: 1 X-NAIMIME-Modified: 1 X-Virus-Checked: Checked by ClamAV on apache.org One is JSTL, the other is using OGNL and they are not the same. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: ravi_eze > Reply-To: Struts Users Mailing List > Date: Tue, 19 Feb 2008 08:44:06 -0800 (PST) > To: > Subject: Re: S2 NESTED iterators & FLAT HashMaps: > > > hi, > > The answers were a real help. I could get the things to things working... > > now when i use: fruits Val :${fruitsId.value} this displays: fruits Val > :[apple, banana, orange] > > but when i use: ${fruitsId.value.size()} its giving compile time > errors:tAttributes.jsp(98,16) The function size must be used with a prefix > when a default namespace is not specified. I need to get 3 so how should i > form the expression? > > if i use: then its displaying > 3. The tag is written as follows: > > id="fruitsId" > status="fruitsStat" > value="fruitColourInfo"> > > ... > > i basically need to use this in < td colspan="{...}" > ... is there any > alternative ways of handling this? any ideas pl: help > > ravi > > > > Laurie Harper wrote: >> >>> fruits KEY >> >> Gets the key from the map entry and displays it; OK here. >> >>> fruits Val >> >> Gets the 'value' property of the iterator status object and uses that as >> a lookup key in the application's message resources. Umm... First, I'm >> not sure if the iterator status object has a value property, but >> wouldn't you want the value from the map entry? And second, do you have >> the message properties set up? >> >> That should probably be >> >> fruits Val >> >> and, for sanity checing (in case your message resources aren't set up >> correctly) you should start with just >> >> fruits Val >> >> L. >> >> Ravichandra C wrote: >>> Hi, >>> >>> I am trying this way: >>> >>> >>> >> value="fruitscolourandInfo" > >>> fruits KEY >>> >>> fruits Val >>> >>> >> value="fruitsId.value" > >>> colour >>> >>> >>> >>> The issue is that: >>> Fruits key: is being displayed fine >>> Fruits Val: nothing is being dislayed; infact when I tried similarly >>> with fruits KEY even that is not being displayed. Any ideas how to get >>> this working.. (in fact I need to get the results in textboxes next) >>> >>> Any help? >>> Ravi >>> >>> -----Original Message----- >>> From: Musachy Barroso [mailto:musachy@gmail.com] >>> Sent: Monday, February 18, 2008 10:09 PM >>> To: Struts Users Mailing List >>> Subject: Re: S2 NESTED iterators & FLAT HashMaps: >>> >>> When you use the "iterator" tag, the value of the "id" tag becomes the >>> reference to the current object on that iteration(same as "top" on >>> this case). When iterating over a map, the object is a Map.Entry, so >>> you need to access the "key" and "value" properties, like >>> >>> >>> Key: ....same as >> value="key" /> >>> Value: ....same as >>> >>> >>> >>> is not a direct answer to your question, but I think your problem is >>> around that. >>> //you can always do %{superMap[top.key]} to access the value, it is >>> just harder to read >>> >>> regards >>> musachy >>> >>> On Feb 18, 2008 11:21 AM, ravi_eze wrote: >>>> hi, >>>> >>>> i have 4 hashmaps as follows: >>>> (1). HashMap> treesFruitsMap = new HashMap(); >>>> (2). HashMap> fruitsColourMap = new HashMap(); >>>> (3). HashMap colourVitaminMap = new HashMap(); >>>> >>>> i.e. >>>> (1) has the mapping btw tree names and the fruits it bears (as a set >>> of >>>> strings) >>>> (2) has the mapping btw fruit name and the possible colours it can >>> come out >>>> in >>>> (3) mapping btw fruit and the vitamins it has in it. >>>> >>>> I need to display the output as follows: >>>> Fruit1 - Colour1 - Vitamin1 >>>> Fruit1 - Colour1 - Vitamin2 >>>> Fruit1 - Colour2 - < corresponding vitamins > >>>> ... >>>> >>>> any idea how to go with this? I tried as follows but its not working.. >>>> >>>> >> value="frColourMap.keySet()" > >>>> >>>> FE
>>>> BR
>>>>
>>>>
>>>> >>>> this is giving only the fruits names but not the colours... >>>> >>>> pl: help. >>>> >>>> -- >>>> View this message in context: >>> http://www.nabble.com/S2-NESTED-iterators---FLAT-HashMaps%3A-tp15546918p >>> 15546918.html >>>> Sent from the Struts - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >>>> For additional commands, e-mail: user-help@struts.apache.org >>>> >>>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: user-help@struts.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/S2-NESTED-iterators---FLAT-HashMaps%3A-tp15546918p155615 > 58.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org