Thanks for reply.
My Entry point class :
package com.mantra.draw2d.Home.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Home implements EntryPoint {
public void onModuleLoad() {
checkLogin(this);
}
public void UserLogin(){
Window.alert("User Login");
}
private static native void checkLogin(Home x)/*-{
$wnd.checkLogin = function(){
[email protected]::UserLogin()();
};
}-*/;
}
And My Html file is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function cheLogin(){
alert("GWT Call");
@com.mantra.draw2d.Home.client:: checkLogin()()
alert("GWT Call");
}
</script>
</head>
<body onload="cheLogin()">
</body>
</html>
My goal is call gwt menthod from javascript application.
I written this classes,but i am unable to call UserLogin method from
java script application.
Is there any problem in my code?
Please help me to fix this issue.
On Jan 9, 9:47 am, "olivier FRESSE" <[email protected]> wrote:
> Yes you can :
>
> http://code.google.com/intl/fr/docreader/#p=google-web-toolkit-doc-1-...
>
> 2009/1/9 rajesh_ch <[email protected]>
>
>
>
> > Hai,Thanks for quick reply.
>
> > i am trying to call one of the GWT method from outside application.
>
> > Like , i have to check whether user logged in or not.
>
> > i written a method to check whether user logged in or not,but i need
> > to call this method from outside my gwt application.
>
> > is it possible to call gwt method outside application? i want to call
> > my gwt method from javascript.
>
> > Thank u
>
> > On Jan 8, 6:49 pm, "olivier FRESSE" <[email protected]> wrote:
> > > This is not very clear.
> > > Are you trying to manage user authentication in a GWT application ?
> > > If yes, what kind of authentication do you want to manage. Simple web
> > based
> > > one, using ACEGI,....?
>
> > > 2009/1/8 rajesh_ch <[email protected]>
>
> > > > Hai All,
>
> > > > I have one requirement like, i need to get the string data from
> > > > project html file to entry point class.
>
> > > > like say i project html file is Home.html .From this html file i need
> > > > to pass string value to entry point
> > > > class.
>
> > > > In entry point , i need to get that value and check whether user
> > > > logged in or not.
>
> > > > If user logged in i need to call different java class with this
> > > > parameter.
>
> > > > if user not logged in , i have to show login form then i need to call
> > > > different java class with this parameter.
>
> > > > Please help me to work on this.
>
> > > > Thank u
>
> > > > Best Regards
> > > > Rajesh
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---