You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tomask79 <to...@embedit.cz> on 2014/11/18 14:15:56 UTC

ajax call event callbacks in Wicket 6.0, just question

Hi guys,

I just want to ask about the registering of AJAX "onSuccess" and "onFail"
javascript callbacks in Wicket 6.0. 

*In Wicket 1.5.8 we used in JavaScript*:



*Now in Wicket 6.0 when I change it to :*



Server's ajax behaviour is being invoked correctly as well, but Ajax
callbacks (2nd or 3th parameter of  Wicket.Ajax.get) *are never called*.

Well, I was debugging wicket-ajax-jquery.js and it seems now that in Wicket
6.0 the only way of registering the ajaxCallbacks is using the global topics

 

It seems that we can't register ajax callback for just *one particular* ajax
call in JavaScript. We need to do it globally like:




Which isn't very nice solution...IMHO. Or do we have an opportunity to
register ajax callback for JUST one particular call of Wicket.Ajax.get ?

thanks a lot in advance for clarification.

best regards

Tomas

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ajax-call-event-callbacks-in-Wicket-6-0-just-question-tp4668446.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: ajax call event callbacks in Wicket 6.0, just question

Posted by tomask79 <to...@embedit.cz>.
Thank you Martin for the links.

Wicket.Ajax.get ({'u':'<URL>', 'sh': <JS CODE>});

did the wanted trick.

T.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ajax-call-event-callbacks-in-Wicket-6-0-just-question-tp4668446p4668448.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: ajax call event callbacks in Wicket 6.0, just question

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

See:
1) http://wicket.apache.org/guide/guide/ajax.html#ajax_5
2) http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
3)
https://github.com/martin-g/blogs/blob/master/wicket6-ajax-demo/src/main/java/com/wicketinaction/HandlebarsButton.java#L93


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Nov 18, 2014 at 3:15 PM, tomask79 <to...@embedit.cz> wrote:

> Hi guys,
>
> I just want to ask about the registering of AJAX "onSuccess" and "onFail"
> javascript callbacks in Wicket 6.0.
>
> *In Wicket 1.5.8 we used in JavaScript*:
>
>
>
> *Now in Wicket 6.0 when I change it to :*
>
>
>
> Server's ajax behaviour is being invoked correctly as well, but Ajax
> callbacks (2nd or 3th parameter of  Wicket.Ajax.get) *are never called*.
>
> Well, I was debugging wicket-ajax-jquery.js and it seems now that in Wicket
> 6.0 the only way of registering the ajaxCallbacks is using the global
> topics
>
>
>
> It seems that we can't register ajax callback for just *one particular*
> ajax
> call in JavaScript. We need to do it globally like:
>
>
>
>
> Which isn't very nice solution...IMHO. Or do we have an opportunity to
> register ajax callback for JUST one particular call of Wicket.Ajax.get ?
>
> thanks a lot in advance for clarification.
>
> best regards
>
> Tomas
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ajax-call-event-callbacks-in-Wicket-6-0-just-question-tp4668446.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>