GWT Interview Questions and Answers
Question: Code of entry point with onModuleLoad where split out is working.Answer: To split your code, simply insert calls to the method GWT.runAsync at the places where you want the program to be able to pause for downloading more code. These locations are called split points. For this you should use runAsync.public class Hello implements EntryPoint { public void onModuleLoad() { Button b = new Button("Click me", new ClickHandler() { public void onClick(ClickEvent event) { GWT.runAsync(new RunAsyncCallback() { public void onFailure(Throwable caught) { Window.alert("Code download failed"); } public void onSuccess() { Window.alert("Hello, AJAX"); } }); } }); RootPanel.get().add(b); } } |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Google Web Toolkit (GWT)?
- How many modes are provided by GWT to execute application?
- What are Modules, Entry Points and HTML Pages in GWT?
- How can you set Browser targeted Compilation in GWT?
- How can we run GWT application?