You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Diogo Bacelar Quintela (JIRA)" <co...@jakarta.apache.org> on 2005/08/26 18:45:26 UTC

[jira] Created: (JELLY-220) core:forEach doesn't use a nested context

core:forEach doesn't use a nested context
-----------------------------------------

         Key: JELLY-220
         URL: http://issues.apache.org/jira/browse/JELLY-220
     Project: jelly
        Type: Bug
 Reporter: Diogo Bacelar Quintela


As said in summary, analising ForEachTag.java and a simple test (see below) this tags set's variables into current JellyContext, not using childContext.

This could be another source for a memory leak, don't know for sure.

JSTL states that a nested context should be used - this tag aims to be JSTL compliant.
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/c/forEach.html

<j:jelly xmlns:j="jelly:core">
<a>
    <b>
        <j:forEach var="class1" items="${metadata}">
            <c>${util.getName(class1)}</c>
        </j:forEach>
        <c-out-of-context>${util.getName(class1)}</c-out-of-context>

        <j:scope>
            <j:forEach var="class2" items="${metadata}">
                <d>${util.getName(class2)}</d>
            </j:forEach>
        </j:scope>
        <d-out-of-context>${util.getName(class2)}</d-out-of-context>
    </b>
</a>
</j:jelly>

resulting in 

<?xml version="1.0" encoding="ISO-8859-1"?>

<a>
  <b>
    <c>TestName</c>
    <c-out-of-context>TestName</c-out-of-context>
    <d>TestName</d>
    <d-out-of-context/>
  </b>
</a>




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org