Hello Everyone
Im trying to call a Java function from an eval, so far no luck, any
ideas on how this could be done?
this is the code:
public native void runj() /*-{
$wnd.eval("new MyAjaxClass($('#myDiv'),{onSubmit : function
(file, ext){[email protected]::myOnSubmit(Ljava/lang/String;)
('test');}});");
}-*/;
public void myOnSubmit(String string) {
Window.alert("its submiting");
}
i have also tryed
public native void runj() /*-{
$wnd.my_call = function(id) {
[email protected]:myOnSubmit(Ljava/lang/String;)(id);
}
$wnd.eval("new MyAjaxClass($('#myDiv'),{onSubmit : function
(file, ext){my_call('test')}});");
}-*/;
any ideas?
it has to be inside eval, otherwise it wouldnt work
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---