Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 78575 invoked from network); 24 Sep 2004 15:05:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Sep 2004 15:05:42 -0000 Received: (qmail 7242 invoked by uid 500); 24 Sep 2004 15:04:50 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 7091 invoked by uid 500); 24 Sep 2004 15:04:48 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 6944 invoked by uid 99); 24 Sep 2004 15:04:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [216.193.217.213] (HELO meteor.lunarpages.com) (216.193.217.213) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 24 Sep 2004 08:04:44 -0700 Received: from cpanel by meteor.lunarpages.com with local (Exim 4.34) id 1CAreB-00036r-GM for commons-dev@jakarta.apache.org; Fri, 24 Sep 2004 08:06:07 -0700 Received: from 67.51.180.43 ([67.51.180.43]) by login.meteor.lunarpages.com (IMP) with HTTP for ; Fri, 24 Sep 2004 08:06:07 -0700 Message-ID: <1096038367.415437df6ddf6@login.meteor.lunarpages.com> Date: Fri, 24 Sep 2004 08:06:07 -0700 From: Ben Anderson To: Jakarta Commons Developers List Subject: [JELLY] Re: j:forEach bug References: <0I4J004AJ1ZJF8@mta4.srv.hcvlny.cv.net> In-Reply-To: <0I4J004AJ1ZJF8@mta4.srv.hcvlny.cv.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Originating-IP: 67.51.180.43 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - meteor.lunarpages.com X-AntiAbuse: Original Domain - jakarta.apache.org X-AntiAbuse: Originator/Caller UID/GID - [32001 32003] / [47 12] X-AntiAbuse: Sender Address Domain - benanderson.us X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/horde/imp/compose.php X-Source-Dir: /usr/local/cpanel/base/horde/imp X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Ok, I posted the problem/patch in jira, JELLY-150. It includes the test case to prove it's not functioning correctly as well as my attempt to fix it. The code is commented so that hopefully someone can help me. > If the functionality worked properly in XML but didn't exactly implement > javax.servlet.jsp.jstl.core.LoopTagStatus, would that be good for you? yeah, that's pretty much what I did. I created an anonymous inner class like this: + if (varStatus != null) { + context.setVariable(varStatus, + new Object() { + public Integer getBegin() { + return new Integer(begin); + } + public int getCount() { + return count; ... However, the test script still fails. It seems the methods aren't being called correctly. Do you know why this might be? Because it's an anonymous inner class? -Ben Quoting Hans Gilde : > > Well... this would definitely be a nice feature. > > FYI, Ben, this example/explanation is perfect. The original email about a > bug and your patch would have been more concise and easily digested if it > included the info in this last email. > > If the functionality worked properly in XML but didn't exactly implement > javax.servlet.jsp.jstl.core.LoopTagStatus, would that be good for you? > > Hans > > -----Original Message----- > From: Ben Anderson [mailto:benanderson@benanderson.us] > Sent: Thursday, September 23, 2004 11:59 AM > To: Jakarta Commons Developers List > Subject: [JELLY] Re: j:forEach bug > > I'll post my patch to jira tomorrow - I left the code at work. The JSTL > compliance I'm referring to is the varStatus attribute, which according > to the jstl spec should implement > javax.servlet.jsp.jstl.core.LoopTagStatus. Meanwhile the jelly > attribute assigns a variable with type of Integer which is an index. I > would like to do something like this, which works nicely using the > Standard 1.1 taglibs. > > > this is the last time through > > > I know there are other ways to do this, but is seems to me the jstl way > is much nicer ;-) > -Ben > > Paul Libbrecht wrote: > > > Ben, > > > > There has been several considerations on making j:forEach more jstl > > compliant... you might to consider them first: > > > > http://nagoya.apache.org/jira/secure/IssueNavigator.jspa? > > reset=true&mode=hide&summary=true&description=true&query=forEach > > > > Do note that Jelly uses Jira and not Bugzilla! > > > > To make your patch, I think there's an option of "cvs diff" that > > allows a unified diff... > > > > All in all, I haven't understood very well what is the goal of your > > change! > > > > Personally, I'd more and more consider the need for forEach to be > > JSTL compliant as somewhat... annoying. > > > > paul > > > > Le 23 sept. 04, � 17:28, Ben Anderson a �crit : > > > >> I'm new to this list, and developer tasks in Apache projects. I > >> found a bug in > >> jelly's forEach tag, which is not conformant to jstl. I've tried to > >> fix it and > >> am close (I think), but it's not functioning exactly as I suspected > >> it would. > >> Maybe someone could offer some help. I want to check the specific > >> process for > >> this. Should I enter a bug in bugzilla? I can then post my patch > >> there? > >> Also, I've added a couple of files(tests). Do I just append these? > >> Somethine > >> like: > >> > >> $cvs diff -u > site.patch > >> $echo "src/test/org/apache/commons/jelly/core/TestForEachTag.java" > >> >> site.patch > >> $cat src/test/org/apache/commons/jelly/core/TestForEachTag.java >> > >> site.patch > >> $echo "src/test/org/apache/commons/jelly/core/testForEachTag.jelly" > >> >>site.patch > >> $cat src/test/org/apache/commons/jelly/core/testForEachTag.jelly >> > >> site.patch > >> > >> also, like I said this patch isn't complete. What I'm doing is > >> creating an > >> anonymous inner class and setting that in the context. The jelly > >> script > >> recognizes the object, but doesn't proper evaluate it's methods: > >> > >> > >> > >> > >> > >> > >> I'm thinking this may have something to do with it being an > >> anonymous inner > >> class. Eyeballing my patch would be much easier than me explaining > >> here, so I > >> won't go into much detail. I'm just curious as to the next step I > >> should take. > >> > >> Thanks, > >> Ben > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > >> For additional commands, e-mail: commons-dev-help@jakarta.apache.org > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org