cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r494773 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java status.xml
Date Wed, 10 Jan 2007 09:24:06 GMT
Author: cziegeler
Date: Wed Jan 10 01:24:02 2007
New Revision: 494773

URL: http://svn.apache.org/viewvc?view=rev&rev=494773
Log:
Fix COCOON-1979
Check for reloading of javascript files loaded by cocoon.load().

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java?view=diff&rev=494773&r1=494772&r2=494773
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/CompilingInterpreter.java
Wed Jan 10 01:24:02 2007
@@ -105,6 +105,10 @@
             return source;
         }
 
+        public long getCompileTime() {
+            return compileTime;
+        }
+
         public Script getScript(Context context, Scriptable scope,
                                 boolean refresh, CompilingInterpreter interpreter)
         throws Exception {

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java?view=diff&rev=494773&r1=494772&r2=494773
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
Wed Jan 10 01:24:02 2007
@@ -634,7 +634,9 @@
                 } else {
                     this.sourceresolver.release(src);
                 }
-                compiledScript = entry.getScript(cx, this.scope, false, this);
+                boolean needsRefresh = reloadScripts &&
+                             (entry.getCompileTime() + checkTime < System.currentTimeMillis());
+                compiledScript = entry.getScript(cx, this.scope, needsRefresh, this);
                 return compiledScript;
             }
         }

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/status.xml?view=diff&rev=494773&r1=494772&r2=494773
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Wed Jan 10 01:24:02 2007
@@ -181,6 +181,9 @@
 
   <changes>
   <release version="2.1.11" date="TBD">
+    <action dev="CZ" type="fix" fixes-bug="COCOON-1979" due-to="Rob Berens">
+      Core: Check for reloading of javascript files loaded by cocoon.load().
+    </action>
     <action dev="JH" type="add" fixes-bug="COCOON-1471" due-to="Robin Wyles">
       Forms block: Add method to create binding from DOM tree.
     </action>



Mime
View raw message