cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r562427 - in /cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon: objectmodel/helper/TemplateObjectModelHelper.java template/environment/FlowObjectModelHelper.java
Date Fri, 03 Aug 2007 12:17:51 GMT
Author: gkossakowski
Date: Fri Aug  3 05:17:49 2007
New Revision: 562427

URL: http://svn.apache.org/viewvc?view=rev&rev=562427
Log:
Parameters are added to ObjectModel in FlowObjectModelHelper class instead of TemplateObjectModelHelper.

Modified:
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java

Modified: cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java?view=diff&rev=562427&r1=562426&r2=562427
==============================================================================
--- cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
(original)
+++ cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
Fri Aug  3 05:17:49 2007
@@ -84,20 +84,12 @@
 
     /**
      * Create the object model.
-     * Currently the object model is a map with one single entry:
-     *  cocoon + continuation    The Continuation (if available)
-     *         + parameters      The parameters (if provided)
      */
     public static Map getTemplateObjectModel(final Map objectModel, 
                                              final Parameters parameters) {
 
         // first create the "cocoon object":
         final Map cocoon = new HashMap();
-            
-        // cocoon.parameters
-        if (parameters != null) {
-            cocoon.put("parameters", new ParametersMap(parameters));
-        }
 
         final Map map = new HashMap();
         map.put("cocoon", cocoon);

Modified: cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java?view=diff&rev=562427&r1=562426&r2=562427
==============================================================================
--- cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
(original)
+++ cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
Fri Aug  3 05:17:49 2007
@@ -22,6 +22,7 @@
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.components.flow.FlowHelper;
 import org.apache.cocoon.objectmodel.ObjectModel;
+import org.apache.cocoon.objectmodel.helper.ParametersMap;
 import org.apache.cocoon.objectmodel.helper.TemplateObjectModelHelper;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.Scriptable;
@@ -68,6 +69,7 @@
                 continue;
             newObjectModel.put(key, expressionContext.get(key));
         }
+        ((Map)newObjectModel.get("cocoon")).put("parameters", new ParametersMap(parameters));
         newObjectModel.put(org.apache.cocoon.objectmodel.ObjectModel.CONTEXTBEAN, FlowHelper.getContextObject(objectModel));
     }
 



Mime
View raw message