cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r411220 - in /cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF: display-clock.xml linked-updater.xml sitemap.xmap
Date Fri, 02 Jun 2006 17:41:46 GMT
Author: antonio
Date: Fri Jun  2 10:41:46 2006
New Revision: 411220

URL: http://svn.apache.org/viewvc?rev=411220&view=rev
Log:
Show more samples using cocoon.ajax.periodicalUpdate().

Added:
    cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/display-clock.xml
  (with props)
Modified:
    cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/linked-updater.xml
    cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/sitemap.xmap

Added: cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/display-clock.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/display-clock.xml?rev=411220&view=auto
==============================================================================
--- cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/display-clock.xml
(added)
+++ cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/display-clock.xml
Fri Jun  2 10:41:46 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2006 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<span>
+  ${java.util.Calendar.getInstance().getTime()}
+</span>

Propchange: cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/display-clock.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/linked-updater.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/linked-updater.xml?rev=411220&r1=411219&r2=411220&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/linked-updater.xml
(original)
+++ cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/linked-updater.xml
Fri Jun  2 10:41:46 2006
@@ -29,6 +29,16 @@
 	    cocoon.ajax.periodicalUpdate(2000, "display-freememory", "freemem");
 	}
 	dojo.addOnLoad(initTimer);
+	
+	function initClock() {
+  	cocoon.ajax.periodicalUpdate(1000, "display-clock", "clock");
+	}
+	dojo.addOnLoad(initClock);
+	
+	function initClock1() {
+  	cocoon.ajax.periodicalUpdate(5000, "display-clock", "clock1");
+	}
+ 	dojo.addOnLoad(initClock1);
   </script>
 
 	<style>
@@ -49,9 +59,15 @@
 					<a href="linked-updater-content-3" dojoType="PartialLink" target="top#changeme">Click
me to insert at the top</a><br/>
 					<a href="linked-updater-content-3" dojoType="PartialLink" target="bottom#changeme">Click
me to insert at the bottom</a><br/>
 					<a href="linked-updater-content-3" dojoType="PartialLink" target="after#changeme">Click
me to insert after</a><br/>
-					<br/>
-					Memory available on the server:<br/>
-					<span id="freemem">[unkown]</span>
+					<p>Memory available on the server:
+					  <span id="freemem">[unkown]</span>
+					</p>
+					<p>Current Time on the server (updated every 1 second):
+					  <span id="clock">[unkown]</span>
+					</p>
+  				<p>Current Time on the server (updated every 5 seconds):
+					  <span id="clock1">[unkown]</span>
+					</p>
 				</td>
 				<td>
 					<div class="container">
@@ -63,7 +79,5 @@
 				</td>
 			</tr>
 		</table>
-	
-	
 	</content>
-</page>
\ No newline at end of file
+</page>

Modified: cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/sitemap.xmap?rev=411220&r1=411219&r2=411220&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/sitemap.xmap
(original)
+++ cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/sitemap.xmap
Fri Jun  2 10:41:46 2006
@@ -60,11 +60,10 @@
        <map:serialize type="html"/>
      </map:match>
 
-     <map:match pattern="display-freememory">
+     <map:match pattern="display-*">
        <map:generate type="jx" src="{0}.xml"/>
        <map:serialize type="html"/>
      </map:match>
-
 
      <!-- Generic pipeline to load resources in jars -->
      <map:match pattern="resources/*/**">



Mime
View raw message