Return-Path: X-Original-To: apmail-tiles-users-archive@minotaur.apache.org Delivered-To: apmail-tiles-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D25E79E3 for ; Sat, 8 Oct 2011 19:40:23 +0000 (UTC) Received: (qmail 8341 invoked by uid 500); 8 Oct 2011 19:40:23 -0000 Delivered-To: apmail-tiles-users-archive@tiles.apache.org Received: (qmail 8285 invoked by uid 500); 8 Oct 2011 19:40:23 -0000 Mailing-List: contact users-help@tiles.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tiles.apache.org Delivered-To: mailing list users@tiles.apache.org Received: (qmail 8277 invoked by uid 99); 8 Oct 2011 19:40:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2011 19:40:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [88.198.150.83] (HELO mail.ich-geh-kaputt.de) (88.198.150.83) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2011 19:40:14 +0000 Received: from g224231064.adsl.alicedsl.de ([92.224.231.64] helo=[192.168.0.107]) by mail.ich-geh-kaputt.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1RCckU-0002dE-1x; Sat, 08 Oct 2011 21:39:54 +0200 Message-ID: <4E90A706.6090209@ich-geh-kaputt.de> Date: Sat, 08 Oct 2011 21:39:50 +0200 From: Kai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15 MIME-Version: 1.0 To: users@tiles.apache.org Subject: EL-Expression in definition ignores page-scope Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello! I am trying to decorate one base-template mit varying extra-functionality. For example one listing of objects, with different additional informations, depending on the access rights granted to the user. My idea was, to use a nested anonymous definition, which pics up a page-context variable via an EL-expression. Here is a simplified version, of what I have put together: The definition: -------------------- --------------------- list.jsp: --------------------- <%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" session="false" %> <%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="t" %> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> test
  • Loop #${i}:
--------------------- dynamic.jsp: --------------------- <%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" session="false" %> <%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="t" %> Dynamic variable in nested definition: ${x} --------------------- The problem ist: The EL-expression ${i} does not pick up the variable from the page-scope! If I push the variable to request-scope with an inside the -loop, everything works fine. But that would polute the "global namespace" and might therefore lead to other hard to find errors later on. Besides, using the EL-expression would be pretty pointless than, because the variable is visible in the nested definition anyway. Am I missing something, is this a bug, or why is it not possible to pick up variables from page-scope via EL-expressions in definitions? Greetings Kai