Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
In directory james.mmbase.org:/tmp/cvs-serv32604
Modified Files:
ContextTag.java
Log Message:
MMB-1730
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
See also: http://www.mmbase.org/jira/browse/MMB-1730
Index: ContextTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/ContextTag.java,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- ContextTag.java 7 Oct 2008 09:52:42 -0000 1.91
+++ ContextTag.java 7 Oct 2008 10:39:48 -0000 1.92
@@ -43,7 +43,7 @@
* </p>
*
* @author Michiel Meeuwissen
- * @version $Id: ContextTag.java,v 1.91 2008/10/07 09:52:42 michiel Exp $
+ * @version $Id: ContextTag.java,v 1.92 2008/10/07 10:39:48 michiel Exp $
* @see ImportTag
* @see WriteTag
*/
@@ -61,6 +61,7 @@
private int number;
private CloudContext cloudContext;
+ private ContextContainer prevParent;
private Attribute referid = Attribute.NULL;
private Attribute scope = Attribute.NULL;
@@ -137,6 +138,7 @@
log.debug("Start tag of ContextTag");
ContextContainer container;
int s = getScope();
+ prevParent = null;
if (referid != Attribute.NULL || (s != PageContext.PAGE_SCOPE &&
getId() != null)) {
Object o;
if (s == PageContext.PAGE_SCOPE) {
@@ -156,6 +158,8 @@
throw new JspTagException("Found context var '" + o + "'
is not of type Context but of '" + o.getClass().getName());
}
container = (ContextContainer) o;
+ log.debug("Resetting parent of " + container + " to " +
getContextProvider().getContextContainer());
+ prevParent = container.getParent();
container.setParent(pageContext,
getContextProvider().getContextContainer());
pageContext.setAttribute(CONTAINER_KEY_PREFIX + number,
container, PageContext.PAGE_SCOPE);
}
@@ -326,13 +330,15 @@
}
public int doEndTag() throws JspTagException {
- getContextContainer().release(pageContext,
getContextProvider().getContextContainer()); // remove the vars from
'page-context' again if necessary.
+ getContextContainer().release(pageContext, prevParent != null ?
prevParent : getContextProvider().getContextContainer()); // remove the vars
from 'page-context' again if necessary.
cloudContext = null;
+ prevParent = null;
return super.doEndTag();
}
public void doFinally() {
cloudContext = null;
+ prevParent = null;
super.doFinally();
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs