Hi,

Thanks for reply. The you hjave made I am aware of. I am testing in hosted mode 
only.
This doesn't work.

If any idea, please help me out.
  
Regards,
 
Manish
  ----- Original Message ----- 
  From: yunhui song 
  To: [email protected] 
  Sent: Friday, November 14, 2008 1:07 PM
  Subject: Re: Problem with JSNI call


  System.out work only on host mode. 
  When you use JSNI, it can be tested on web mode. 
  System.out has no affect on web mod. 
  So Use Window.alert() to output the message, it should work.


  Sammi


  On Thu, Nov 13, 2008 at 10:32 PM, Manish Kumar <[EMAIL PROTECTED]> wrote:

    Hi
     
    Thank all of you for providing continuos help and advice by this
    group.
     
    I am trying a call java method from javascript using JSNI. My code follows :

    ** Java code

    // exportStaticMethod is called on onModul;eLoad
    public static native void exportStaticMethod() /*-{

    $wnd.invokeGWT = function(idparameter){ 
@com.pm.output.html.gwt.model.comment.client.PMGWTHtmlUtils::invokeGWT(Ljava/lang/String;)(idparameter);

    };

    }-*/;


    public static void invokeGWT( String idparameter ) {

    System.out.println( " xxxxxxxxxxxxxxxxxxxxxxxxxxxx :"+ idparameter ); 

    }

    **** Javascript code :

    // callGWTUtils is called from HTML (external , my idea is to include 
noCache.js in this HTML  to passed the call to GWT, please free to give any 
thought on this  )

     though I testing this using internal GWT html  

    function callGWTUtils( bttnId )

    {  alert('xxxxxxxxxxx'); // this appears .

         invokeGWT( "vvvvvvvvvvvvvvvv" ); // This is not called as expected

    }

    Can anybody please correct me where I am doing wrong. 

    Regards,
     
    Manish









  

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to