>
>
>
>    1. @JsFunction exported to JS doesn't have apply() and call()
>     operations. Apply() is used by JQuery (2.1.3) to call callbacks, so 
>    basically it wasn't possible to add handlers using JQuery. See other 
> thread 
>    on this: 
>    https://groups.google.com/forum/#!topic/google-web-toolkit/PHtfLTSAJDM 
>
> Pretty interesting how to model that JQuery callback with JsInterop. 
Basically when you do $("p").click(handler) then JQuery sets "this" for the 
handler to the element the event occurred on so you can do 

$("p").click(function() {
   $(this).slideUp(); // slides the clicked p element up
});

I think you can't really do that with just JsInterop. I think your Java 
callback must be JQueryCallback.exec(Element elem, Event e) and you have to 
use JSNI to create a pure JS function that passes "this" as "elem" to the 
JQueryCallback.

-- J.


 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/f20db70d-40b8-4c60-ac99-05deb1a98e15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to