Author: jmorliaguet
Date: Fri Jan  6 16:54:18 2006
New Revision: 2161

Added:
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_model_view_test.html
   (contents, props changed)
Log:

- added some concept code for the model <-> view link



Added: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_model_view_test.html
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_model_view_test.html
      Fri Jan  6 16:54:18 2006
@@ -0,0 +1,46 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xml:lang="en" lang="en"
+      xmlns="http://www.w3.org/1999/xhtml";
+      xmlns:cpsskins=http://namespaces.zope.org/cpsskins";>
+<head>
+  <title>CPSSkins Unit test file</title>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <script src="../../prototype.js" type="text/javascript"></script>
+  <script src="../../json.js" type="text/javascript"></script>
+  <script src="../../cpsskins.js" type="text/javascript"></script>
+  <link rel="stylesheet" href="../../cpsskins.css" type="text/css" />
+
+  <script type="text/javascript">
+    Event.observe(window, "load", start);
+    var timer;
+
+    function start() {
+      timer = setInterval("updateModel()", 1000);
+    }
+
+    function updateModel() {
+      var data = Canvas.getNodeData("data-provider");
+      data.size += 1;
+      Canvas.updateNodeData("data-provider", data);
+    }
+  </script>
+
+</head>
+
+<body>
+
+  <h1>CPSSkins model-view test</h1>
+
+  <p>The view observes the model. When the model changes the view gets 
updated.</p>
+
+  <!-- model: {"size": 1} -->
+  <div id="data-provider"></div>
+
+  <cpsskins:view widget="grid" observe="data-provider"></cpsskins:view>
+
+
+</body>
+
+</html>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to