Updated Branches:
  refs/heads/master 857732013 -> 43adcf3c6

WICKET-3367
Rewrite all JavaScript inline event handlers to be proper attached event 
handlers

Execute after handlers right after the Ajax request is fired.
Change event name to not have the 'on' prefix.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/43adcf3c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/43adcf3c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/43adcf3c

Branch: refs/heads/master
Commit: 43adcf3c617597fe56cca3c91d51b2df785a2c3f
Parents: 8577320
Author: martin-g <[email protected]>
Authored: Mon Jan 2 12:44:37 2012 +0200
Committer: martin-g <[email protected]>
Committed: Mon Jan 2 12:44:37 2012 +0200

----------------------------------------------------------------------
 .../org/apache/wicket/ajax/AjaxEventBehavior.java  |    2 +-
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/43adcf3c/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java
index 528b407..3a39d97 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java
@@ -84,7 +84,7 @@ public abstract class AjaxEventBehavior extends 
AbstractDefaultAjaxBehavior
         * Sets the throttle delay for this behavior. Throttled behaviors only 
execute once within the
         * given delay even though they are triggered multiple times.
         * <p>
-        * For example, this is useful when attaching this behavior to the 
onkeypress event. It is not
+        * For example, this is useful when attaching this behavior to the 
keypress event. It is not
         * desirable to have an ajax call made every time the user types so we 
throttle that call to a
         * desirable delay, such as once per second. This gives us a near real 
time ability to provide
         * feedback without overloading the server with ajax calls.

http://git-wip-us.apache.org/repos/asf/wicket/blob/43adcf3c/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index c528c6f..9a8763d 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -500,6 +500,9 @@
                                }
                        });
 
+                       // execute after handlers right after the Ajax request 
is fired
+                       self._executeHandlers(attrs.ah);
+
                        var allowDefault = attrs.ad || false; 
 
                        if (!allowDefault && attrs.event) {

Reply via email to