Chapter 3. Building a GWT application: enhancing HelloWorld

 

This chapter covers

  • Enhancing chapter 2’s output for the real world
  • Using widgets, panels, and layout panels, and handling events
  • Manipulating the Document Object Model (DOM)
  • Managing history in a GWT application

In the last chapter, we went through the steps to generate a basic GWT application using the Google Plugin for Eclipse (GPE). The result was the framework of an application with a simple entry point whose onModuleLoad method displayed the text “Hello World!” on the browser page. It wasn’t the most exciting of applications, but it allowed us to examine the structure of a GWT application as well as run it in development mode and compile it for web mode—the basics of GWT development, we called it.

We hope you’re comfortable with those steps now, so it’s time to take the next step—enhancing the basic framework to provide the functionality you want. You could add more HTML content to the application’s web page; enhance the Java code to use more widgets, panels, and handle events; manage a user clicking Forward and

Back browser buttons; and apply styling to make the application look beautiful—we called these the typical techniques used in a nontrivial GWT application.

3.1. Reexamining the example application

3.2. Updating the HTML

3.3. Enhancing the code

3.4. Creating your user interface

3.5. Manipulating the page

3.6. Handling events

3.7. Managing history

3.8. Styling components

3.9. Securing your application

3.10. Building on your understanding

3.11. Summary

sitemap