Re: pass variable from JavaScript to GWT

2011-05-13 Thread donnerhall
On 12 Mai, 23:34, gpike gop...@gmail.com wrote: If I understand your question correctly, you want to use a value that has been populated by JavaScript then it should be as simple as: public final native String getValue() /*-{ return $wnd.a; }-*/; but if you are wanting to pass the value

Re: pass variable from JavaScript to GWT

2011-05-13 Thread Uemit
Your JSNI call looks fine. However if you try to run the Java function from outside the GWT context, then you have to build a bridge ( http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#calling ) Try to debug it with some alert('xyz') statements. -- You received this

pass variable from JavaScript to GWT

2011-05-12 Thread donnerhall
Hello, i got a small question that really puts me under pressure because I'm unable to solve the problem: I am using JavaScript which gives me a String and I wanna use this value in GWT for my methods, e.g. in Java. To do so, I've written a method in GWT that looks like that: --- String a = ;

Re: pass variable from JavaScript to GWT

2011-05-12 Thread gpike
If I understand your question correctly, you want to use a value that has been populated by JavaScript then it should be as simple as: public final native String getValue() /*-{ return $wnd.a; }-*/; but if you are wanting to pass the value to the JavaScript then it would be like: public