Author: knopp
Date: Wed Sep 26 15:36:33 2007
New Revision: 579844

URL: http://svn.apache.org/viewvc?rev=579844&view=rev
Log:
WICKET-1003

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=579844&r1=579843&r2=579844&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
(original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
Wed Sep 26 15:36:33 2007
@@ -800,7 +800,7 @@
                        var res = Wicket.channelManager.schedule(this.channel, 
function() { this.doPost(body); }.bind(this));
                        return res != null ? res: true;
                } else {
-                       return doPost(this);
+                       return this.doPost(body);
                }
        },
        
@@ -1120,10 +1120,12 @@
                    // test if the javascript is in form of identifier|code
                    // if it is, we allow for letting the javascript decide 
when the rest of processing will continue 
                    // by invoking identifier();
-                   var res = text.match("([a-z|A-Z_][a-z|A-Z|0-9_]*)\\|(.*)");
-                   
+                   var res = text.match(new 
RegExp("^([a-z|A-Z_][a-z|A-Z|0-9_]*)\\|((.|\\n)*)$"));
+                                    
                    if (res != null) {
-                       text = "var f = function(" + res[1] + ") {" + res[2] 
+"};";                     
+
+                       text = "var f = function(" + res[1] + ") {" + res[2] 
+"};";
+                                               
                        try {
                                        // do the evaluation
                                eval(text);


Reply via email to