Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 3736 invoked from network); 17 Nov 2007 02:27:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Nov 2007 02:27:13 -0000 Received: (qmail 63421 invoked by uid 500); 17 Nov 2007 02:26:59 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 63370 invoked by uid 500); 17 Nov 2007 02:26:59 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Delivered-To: moderator for issues@commons.apache.org Received: (qmail 60858 invoked by uid 99); 16 Nov 2007 23:26:52 -0000 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Message-ID: <5804518.1195255603065.JavaMail.jira@brutus> Date: Fri, 16 Nov 2007 15:26:43 -0800 (PST) From: "Yung-Lin Ho (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (JELLY-283) Code block inside a ForEach loop should own its own variable scope(content) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Code block inside a ForEach loop should own its own variable scope(content) --------------------------------------------------------------------------- Key: JELLY-283 URL: https://issues.apache.org/jira/browse/JELLY-283 Project: Commons Jelly Issue Type: Bug Components: core / taglib.core Affects Versions: 1.0 Reporter: Yung-Lin Ho Inside a ForEach loop, because jelly does not create a new JellyContent for a forEach loop. Any new variable declared inside this forEach loop will be populate to the current content. For example: Ideally, forEach loop should have its own variable scope. Any new variable defined in this scope should not be populated to outer code block. People can avoid this problem by choosing variable names carefully. However, they are few tags are suffering from this issue. For example, the uses a List to keep all the parameters. If you have a code looks like this: It is going to send the following three requests to google - http://google.com/search?q=0 - http://google.com/search?q=0&q=1 - http://google.com/search?q=0&q=1&q=2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.