Entry points are declared in *.gwt.xml module files. When a module is loaded, every entry point class defined in the module file is instantiated and its EntryPoint.onModuleLoad() method gets called.
An entry point is instantiated only once and onModuleLoad() is also called once, so there is no issue in storing the entry point reference in a static field. In addition, there is no multi-threading in GWT. On Jan 4, 6:22 pm, fachhoch <[email protected]> wrote: > I am a new bee starting with gwt. > I did a hello world example , I did not understand how to retrieve > the entrypoint instance to repalce content from RootPanel. > Here is the code I have > > <code> > public class Application implements EntryPoint { > > /** > * This is the entry point method. > */ > public void onModuleLoad() { > singleton=this; > RootPanel.get().add(new LoginScreen()); > } > > private static Application singleton; > > public static Application get() { > return singleton; > } > > public static void add(Widget widget){ > RootPanel.get().clear(); > RootPanel.get().add(widget); > } > > } > > </code> > in the above code whihc I got from some getting started tutorial , an > instanceof entry point is saved in onModuleLoad method and a > static method which return this instance ? will this not casue > issues in multithreaded ? , please suggest me how to retrieve entry > point instance ? -- 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.
