Hi
Please help me out for a making a call java method from javascript using JSNI .
My code follows :
** Java code
// exportStaticMethod is called on onModuleLoad
public 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);
};
}-*/;
public void invokeGWT( String bId,String cId,String mId,String mName,String
cName ) throws RequestException {
System.out.println( " xxxxxxxxxxxxxxxxxxxxxxxxxxxx :" );
}
**** 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","vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv","vvvvvvvvvvvvvvvv"
);
// This is not called as expected
}
Can anybody please correct me if I am wrong at any place.
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
-~----------~----~----~----~------~----~------~--~---