Page: http://wiki.cocoondev.org/Wiki.jsp?page=LenyaDemo , version: 24 on Mon 
Aug 18 13:46:23 2003 by 204.128.192.72

- 2003.08.18: down, "Bad gateway" errors
+ 2003.08.18: down, "Bad gateway" errors\\
?                                       ++



Page: http://wiki.cocoondev.org/Wiki.jsp?page=GettingStartedWithFlow , version: 
38 on Mon Aug 18 13:45:39 2003 by DerekH

-         <!-- in this example we use JXTemplateGenerator to insert Flow 
variables in page content -->
?                                                                   
----------------------------------

+         <!-- in this example we use JXTemplateGenerator to insert 
+              Flow variables in page content -->
+       <map:selector name="exception" 
-       <map:selector name="exception" 
src="org.apache.cocoon.selection.XPathExceptionSelector">
?       ------------- ----------------

+         src="org.apache.cocoon.selection.XPathExceptionSelector">
+         <exception name="invalid-continuation" 
-         <exception name="invalid-continuation" 
class="org.apache.cocoon.components.flow.InvalidContinuationException"/>
?         ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^

+            
class="org.apache.cocoon.components.flow.InvalidContinuationException"/>
?          ^

+ 
+ 
-     var random =  Math.round( Math.random() * 9 ) + 1;
? --

+   var random =  Math.round( Math.random() * 9 ) + 1;
-     var hint = "No hint for you!"
? --

+   var hint = "No hint for you!"
-     var guesses = 0;
? --

+   var guesses = 0;
-     while (true) {
? --

+   while (true) {
-         sendPageAndWait("guess.jxt", { "random" : random, "hint" : hint, 
"guesses" : guesses} );
? ----                                  -                                       
               -

+     sendPageAndWait("guess.jxt", {"random" : random, "hint" : hint, "guesses" 
: guesses});
-         var guess = parseInt( cocoon.request.get("guess") );
? ----

+     var guess = parseInt( cocoon.request.get("guess") );
+ 
-         guesses++;
? ----

+     guesses++;
-         if (guess) {
? ----

+     if (guess) {
-             if (guess > random) {
? -------

+      if (guess > random) {
-                 hint = "Nope, lower!"
? --------

+         hint = "Nope, lower!"
-             } else if (guess < random) {
? ------

+       } else if (guess < random) {
-                 hint = "Nope, higher!"
? ------

+           hint = "Nope, higher!"
-             } else {
? ------

+       } else {
-                 break;
? ------

+           break;
-             }
-         }
? --

+       }
+   }
-     sendPage("success.jxt", {"random" : random, "guess" : guess, "guesses" : 
guesses} );
? --

+   sendPage("success.jxt", {"random" : random, "guess" : guess, "guesses" : 
guesses} );


Reply via email to