Discussion:
Wicket event listeners not firing.
Entropy
2018-07-24 14:10:12 UTC
Permalink
Hi, I'm trying to do some standard code in response to any wicket ajax event,
but the listeners I'm subscribing aren't firing. This is in Wicket 6. I
stuck a breakpoint in Chrome and IE11, and neither fire these events. I
tried done and init event also. Another action right next to it IS working
so I know the code to subscribe is being reached, and there are no js errors
in the console.

Wicket.Event.subscribe('/ajax/call/before',
function(jqEvent, attributes, jqXHR, errorThrown, textStatus) {
doMyStuff();
}
);

Wicket.Event.subscribe('/ajax/call/complete',
function(jqEvent, attributes, jqXHR, errorThrown, textStatus) {
doMyStuff();
}
);

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
Entropy
2018-07-25 12:29:34 UTC
Permalink
Solved - Needed to wrap this in a thing that waited for the jQuery DOM to
load. I thought the method would do that itself.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org

Loading...