Hi olivier, Thanks for your kind help.
I tried this , this does not work with the exception Could not find a native method with the signature '@com.pm.output.html.gwt.model.comment.client.PMGWTHtmlUtils::exportStaticMethod()' which was not coming before. Please let us know where am I conceptually wrong.If anybody have alternative idea , plz pass it. Regards Manish ----- Original Message ----- From: "olivier nouguier" <[EMAIL PROTECTED]> To: <Google-Web-Toolkit@googlegroups.com> Sent: Friday, November 14, 2008 7:36 PM Subject: Re: Problem with JSNI call to java method from javascript > > Hi, > I suspect (?) that your js code is call to soon ... > The GWT is not yet initialized > > Please try this: > ### GWT patch ### > static > native void exportStaticMethod() > /*-{ > $wnd.invokeGWT = function(bId,cId,mId,mName,cName){ > [EMAIL > PROTECTED]::invokeGWT(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;) > (bId,cId,mId,mName,cName); > }; > // Lazy call to onLoad > if($wnd.my_onload){ > $wnd.my_onload(); > } > }-*/ > ; > ### JS Patch in HTML page #### > // This function will be called by GWT module. > function my_onload(){ > invokeGWT( > "vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv" > ); > } > > By doing this the invokeGWT is call after the module initialise. > > HIH > > -- > Si l'ignorance peut servir de consolation, elle n'en est pas moins > illusoire. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---