You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gk...@apache.org on 2007/07/23 12:22:24 UTC
svn commit: r558681 -
/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
Author: gkossakowski
Date: Mon Jul 23 03:22:19 2007
New Revision: 558681
URL: http://svn.apache.org/viewvc?view=rev&rev=558681
Log:
COCOON-2092: Don't override objectModel field defined in ServiceableGenerator.
Modified:
cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java?view=diff&rev=558681&r1=558680&r2=558681
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java (original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/JXTemplateGenerator.java Mon Jul 23 03:22:19 2007
@@ -70,7 +70,7 @@
public final static String CACHE_KEY = "cache-key";
public final static String VALIDITY = "cache-validity";
- private ObjectModel objectModel;
+ private ObjectModel newObjectModel;
private NamespacesTable namespaces;
private ScriptManager scriptManager;
@@ -105,7 +105,7 @@
*/
public void recycle() {
this.startDocument = null;
- this.objectModel = null;
+ this.newObjectModel = null;
this.namespaces = null;
this.definitions = null;
super.recycle();
@@ -123,7 +123,7 @@
this.startDocument = scriptManager.resolveTemplate(src);
}
- this.objectModel = FlowObjectModelHelper.getNewObjectModelWithFOM(objectModel, parameters);
+ this.newObjectModel = FlowObjectModelHelper.getNewObjectModelWithFOM(objectModel, parameters);
this.namespaces = new NamespacesTable();
this.definitions = new HashMap();
}
@@ -139,12 +139,12 @@
}
public void performGeneration(Event startEvent, Event endEvent) throws SAXException {
- objectModel.markLocalContext();
+ newObjectModel.markLocalContext();
XMLConsumer consumer = new AttributeAwareXMLConsumerImpl(new RedundantNamespacesFilter(this.xmlConsumer));
- ((Map) objectModel.get("cocoon")).put("consumer", consumer);
- Invoker.execute(consumer, this.objectModel, new ExecutionContext(this.definitions, this.scriptManager,
+ ((Map) newObjectModel.get("cocoon")).put("consumer", consumer);
+ Invoker.execute(consumer, this.newObjectModel, new ExecutionContext(this.definitions, this.scriptManager,
this.manager), null, namespaces, startEvent, null);
- objectModel.cleanupLocalContext();
+ newObjectModel.cleanupLocalContext();
}
/**
@@ -157,7 +157,7 @@
return null;
}
try {
- final Serializable templateKey = (Serializable) cacheKeyExpr.getValue(this.objectModel);
+ final Serializable templateKey = (Serializable) cacheKeyExpr.getValue(this.newObjectModel);
if (templateKey != null) {
return new JXCacheKey(this.startDocument.getUri(), templateKey);
}
@@ -178,7 +178,7 @@
}
try {
final SourceValidity sourceValidity = this.startDocument.getSourceValidity();
- final SourceValidity templateValidity = (SourceValidity) validityExpr.getValue(this.objectModel);
+ final SourceValidity templateValidity = (SourceValidity) validityExpr.getValue(this.newObjectModel);
if (sourceValidity != null && templateValidity != null) {
return new JXSourceValidity(sourceValidity, templateValidity);
}