Re: Calling java from external javascript

2010-10-06 Thread Boris Lenzinger
Thank you for your answer. This part (calling js from java) is working fine. But my problem is calling generated javascript from hand written javascript... The export trick (see MyUtilityClass) does not seem to expose javamethods to hand written javascript. How can I call my java code from je

Re: Calling java from external javascript

2010-10-06 Thread Y2i
May be you missed the signature? [instance-ex...@package.classname::methodeName(signature)(parameters) On Oct 6, 12:04 am, Boris Lenzinger boris.lenzin...@gmail.com wrote: Thank you for your answer. This part (calling js from java) is working fine. But my problem is calling generated

Re: Calling java from external javascript

2010-10-06 Thread Boris Lenzinger
Thank you for your suggestions. At last I found what was wrong (well I found a way to make it work :-) ) First, the call to the method in the onclick was not good. It was defining an inline function instead of calling directly the variable that was exported by the MyUtilityClass. button.onclick

Re: Calling java from external javascript

2010-10-06 Thread Yau
Officially, you can refer to the following. Quoted from http://code.google.com/support/bin/answer.py?hl=enanswer=75695 How can I call one of my GWT Java methods from my application host page?Share Comment Print In order to accomplish this, you'll first need to create a JSNI method that creates a

Re: Calling java from external javascript

2010-10-06 Thread Boris Lenzinger
This is great ! It is working perfectly ! Thank you for pointing this out to me !! 2010/10/6 Yau kvle...@gmail.com Officially, you can refer to the following. Quoted from http://code.google.com/support/bin/answer.py?hl=enanswer=75695 How can I call one of my GWT Java methods from my

Calling java from external javascript

2010-10-05 Thread Boris Lenzinger
Hi, I'm currently trying to call a java method from a javascript that lives outside of the generated javascript from GWT. What I want to do is the following : make the gwt component communicates with a javascript component (in both ways). I have to say that I don't know at all javascript..

Re: Calling java from external javascript

2010-10-05 Thread Boris Lenzinger
Sorry for the javascript : there is a mistake : variable name is not buttonnode but button at return step of the method... Anyway the problem still stands ;-) Boris 2010/10/5 Boris Lenzinger boris.lenzin...@gmail.com Hi, I'm currently trying to call a java method from a javascript that lives

Re: Calling java from external javascript

2010-10-05 Thread Daniel Kurka
if you are in javascript its not $wnd its just window :) 2010/10/5 Boris Lenzinger boris.lenzin...@gmail.com Sorry for the javascript : there is a mistake : variable name is not buttonnode but button at return step of the method... Anyway the problem still stands ;-) Boris 2010/10/5 Boris

Re: Calling java from external javascript

2010-10-05 Thread Y2i
I think Boris is correct by using $wnd. I also call my javascript library functions from a native method through $wnd, as described here: http://googlewebtoolkit.blogspot.com/2008/07/getting-to-really-know-gwt-part-1-jsni.html Boris' example seems complicated. At the beginning I would simply