I think this should generally work.  A couple notes:

 * You say it can't call the method ... does it say why?
 * Your alerts should be $wnd.alert() or I don't think it will work.

On Dec 21, 8:57 pm, animesh <[email protected]> wrote:
> I have a javasript variable on my nocache.js
>     <script>
>         var loginRequired = "false";
>     </script>
>
> I access it from GWT app as follows:
>         public native static String isLoginRequired()/*-{
>                 return $wnd.loginRequired;
>         }-*/;
>
> I am trying to set th variable as follows.
>         public native static void setIsLoginRequired(String loginRequired)/*-
> {
>                 alert("Setting =" + loginrequired);
>                 $wnd.loginRequired = loginrequired;
>                 alert("Setting Done");
>         }-*/;
>
> BUt GWT is not able to call the method setIsLoginRequired(...).
>
> Anything wrong with the code?
>
> Thanks in advance!!!

--

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