Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 21077 invoked from network); 2 Jul 2007 14:06:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 14:06:33 -0000 Received: (qmail 62073 invoked by uid 500); 2 Jul 2007 14:06:25 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 62032 invoked by uid 500); 2 Jul 2007 14:06:25 -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 62021 invoked by uid 99); 2 Jul 2007 14:06:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 07:06:25 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of musachy@gmail.com designates 64.233.162.232 as permitted sender) Received: from [64.233.162.232] (HELO nz-out-0506.google.com) (64.233.162.232) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 07:06:21 -0700 Received: by nz-out-0506.google.com with SMTP id z31so1015702nzd for ; Mon, 02 Jul 2007 07:06:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=rMhNp3UvpL91mWvuuGFdKQgLScSW1eA1gymUF+OZoI/B44bi24YLBXbYM6KZYWtSGzzbchHK1LPJCADXUcGRILqY4nbDy13h6XAfPKZd9oCIPRBxNdCGPsJXJaPSMfc2msrcGpevknWe409jUyT+F1BtameDMcUcbLaY50QBWTU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=CqnlLav8AptgYgCvalqsyO5a4G+XtL3kpM7fTVRaz7g40QvPwj/UJdYrcZZhVVXKxDOcblPNJQdQ0rxpZp6RlwCYCf/5O60DUNoOyZkAkKo1RUnwftNaBtrybfDFjWSIoNs1Tasj7pjuwRHOxfFneSiz9LYcnUaLa3kxIUsZ+qQ= Received: by 10.141.20.7 with SMTP id x7mr1458165rvi.1183385159456; Mon, 02 Jul 2007 07:05:59 -0700 (PDT) Received: by 10.140.249.11 with HTTP; Mon, 2 Jul 2007 07:05:59 -0700 (PDT) Message-ID: Date: Mon, 2 Jul 2007 10:05:59 -0400 From: "Musachy Barroso" To: "Struts Users Mailing List" Subject: Re: Has anyone tried this in S2 - THIS LOOKS A BUG In-Reply-To: <456304.88241.qm@web38004.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9067_26832342.1183385159422" References: <46888575.3040807@gmail.com> <456304.88241.qm@web38004.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9067_26832342.1183385159422 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I was digging into this, and the problem doesn't seem to be on the iterator tag itself, when this line is executed (on IteratorComponent): iterator = MakeIterator.convert(findValue(value)); findValue is returning an Array with an extra element at the end, null, which is causing the extra iteration, I think. I'm not really sure why OGNL is doing that. To be continued ... musachy On 7/2/07, tom tom wrote: > > Thanks, > > As I mentioned earlier, I need to have id, > > because I got if statements and logic inside, it is > not merely diplaying the value. > > This bug needs to be fixed. > > Till then be carefull > > > > --- Adam Ruggles wrote: > > > Have you tried this? > > > > > > Value of the arry is > > > >
> >
> > > > > > > > tom tom wrote: > > > I did further investigation, > > > I think this is a bug, I think this is a very > > scary > > > bug. > > > > > > You dont need three iterators, I could reproduce > > this > > > very easily, > > > > > > In your action class have the following, > > > > > > String[] testArray = new String[5]; > > > > > > testArray[0]="test0"; > > > testArray[1]="test1"; > > > testArray[2]="test2"; > > > testArray[3]="test"; > > > > > > > > > session.setAttribute("testArray",testArray); > > > > > > > > > In your jsp have the following > > > > > > > > > > id="testarr"> > > > Value of the arry is > > > > > >
> > >
> > > > > > > > > WHAT it prints is following Issue is for the 4th > > index > > > also it prints test, it should print empty > > > > > > Value of the arry is test0 > > > Value of the arry is test1 > > > Value of the arry is test2 > > > Value of the arry is test > > > Value of the arry is test > > > > > > > > > This is a scary behaviour for me, > > > > > > Has anyone reported this bug, Any JIRA issue > > raised. > > > > > > Thanks > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Ian Roughley wrote: > > > > > > > > >> Take a look at the value stack via the debug tag. > > > > >> > > >> Usually the property tag will keep stepping > > through > > >> the value stack > > >> until a getter for the property is found (the > > object > > >> for the current > > >> iteration is placed on the top of the value > > stack). > > >> Although, if you > > >> are explicitly defining the object (via id and > > >> #test) there shouldn't be > > >> a problem. > > >> > > >> /Ian > > >> > > >> tom tom wrote: > > >> > > >> > > >>> Hi, > > >>> > > >>> I got three iterations which I tried as below in > > >>> > > >> the > > >> > > >>> jsp, First two and Array of certain DTO and last > > >>> iterator is a String array. There is no jsp > > >>> compilation error, but the issue is it produced > > >>> misleading results. > > >>> > > >>> Is there any limitation in S2 for the depth of > > the > > >>> iteration. Is this way of using recommended? > > >>> > > >>> Sometimes where it is suppose to print empty > > value > > >>> > > >> it > > >> > > >>> prints something else (looks like from the > > previous > > >>> iterator) > > >>> > > >>> > > >>> .... > > >>> .... > > >>> > > >>> .... > > >>> .... > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > > > > > > ____________________________________________________________________________________ > > > > > >>> Park yourself in front of a world of choices in > > >>> > > >> alternative vehicles. Visit the Yahoo! Auto Green > > >> Center. > > >> > > >>> http://autos.yahoo.com/green_center/ > > >>> > > >>> > > >> > > > --------------------------------------------------------------------- > > >> > > >>> 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 > > >> > > >> > > >> > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > Sucker-punch spam with award-winning protection. > > > Try the free Yahoo! Mail Beta. > > > > > > http://advision.webevents.yahoo.com/mailbeta/features_spam.html > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > user-unsubscribe@struts.apache.org > > > For additional commands, e-mail: > > user-help@struts.apache.org > > > > > > > > > > > > > > > ____________________________________________________________________________________ > Luggage? GPS? Comic books? > Check out fitting gifts for grads at Yahoo! Search > http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd ------=_Part_9067_26832342.1183385159422--