Book Image

ExtGWT Rich Internet Application Cookbook

By : Odili Charles Opute , Oded Nissan
Book Image

ExtGWT Rich Internet Application Cookbook

By: Odili Charles Opute , Oded Nissan

Overview of this book

<p>Get ready to build the next generation Gmail, Facebook, or Meebo, with HTML5 and Server Push, taking advantage of the power and versatility of Java with ExtGWT. Sencha Ext GWT takes GWT to the next level, giving you high-performance widgets, feature-rich templates and layouts, advanced charting, data loaders and stores,&nbsp; accessibility, and much more.<br /><br /><i>ExtGWT Rich Internet Application Cookbook will teach you to quickly build&nbsp; stunning functionality into your own apps with ExtGWT</i>.<br /><br />This is a catalog of practical solutions to get your ExtGWT web app up and running in no time, with tips for persistence and best practices. You begin by playing with panels, windows, and tabs, to learn the essentials. Next, you engage yourself with forms, buttons, toolbars and menus to build on further. Dealing with the UI and the trees will follow to help you make stunning user interfaces. Then you will be taught to work with Listview, Views, and Gridpanels, the more complex problems. The book will then deal with charts, visualization, and drag and drop to take you to the next level. Finally, you will wind up with serialization, persistence, and custom theming. Now, you are an expert!</p>
Table of Contents (22 chapters)
ExtGWT Rich Internet Application Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Event Handling — Making Those GUIs Do Something
Jakarta Commons-FileUpload

Preface

Get ready to build the next generation Gmail, Facebook, or Meebo, with HTML5 and Server Push, taking advantage of the power and versatility of Java using ExtGWT. Sencha ExtGWT takes GWT to the next level, giving you high performance widgets, feature-rich templates and layouts, advanced charting, data loaders and stores, accessibility, and much more.

ExtGWT Rich Internet Application Cookbook will teach you to quickly build stunning functionality into your own apps, with ExtGWT.

This is a catalog of practical solutions to get your ExtGWT web app up and running in no time, with tips for persistence and best practices. You will begin by playing with panels, windows, and tabs, to learn the essentials. Next, you will engage with forms, buttons, toolbars, and menus, to build on your existing knowledge. Dealing with the UI and the trees will follow, to help you make stunning user interfaces. Then, you will be taught to work with Listview, Views, and Grids, the more complex problems. The book will then deal with charts, visualization, and drag-and-drop, to take you to the next level. Finally, you will wind up with serialization, persistence, and custom theming. And before you know it, you'll be an expert!

What this book covers

Chapter 1, Playing With Panels and Windows, deals with creating windows and different kinds of dialogs.

Chapter 2, Playing Hide and Seek with Tabs, explains how to create and manage tabs.

Chapter 3, Click-ware: Buttons, Toolbars, and Menus, describes how to create and align different types of buttons, how to create menus, and how to create toolbars and align buttons in toolbars.

Chapter 4, Crafting UI Real Estate, deals with the different layouts available in ExtGWT. Layouts such as AccordionLayout, BorderLayout, and CardLayout, as well as creating dashboards, are covered.

Chapter 5, Engaging Users with Forms and Data Input, deals with building forms, binding data into forms, and binding and retrieving remote data into a combobox.

Chapter 6, Data Hierarchy with Trees, introduces the Tree widget. The recipes in this chapter include building a tree, adding custom icons and context menus to the tree, adding checkbox selection to tree nodes, and building asynchronous trees.

Chapter 7, The Venerable Grid Component, presents ExtGWT's complex Grid component. The chapter's recipes demonstrate various features of this complex component, such as: formatting cell data, grouping data and headers, aggregating data, entering data into the grid, and data pagination.

Chapter 8, Templates and Views, introduces the Template component and its use for formatting data.

Chapter 9, Data Makeovers with Charts and Visualizations, deals with the various charts available in ExtGWT as well as drawing shapes with the Canvas class.

Chapter 10, Drag-and-drop, deals with the drag-and-drop mechanism available in ExtGWT as well as using a third-party library to do drag-and-drop, using HTML5.

Chapter 11, Advanced Tips, introduces various advanced topics, such as: using JPA (Java Persistence API) with GWT, using the MVP (model view presenter) pattern, and implementing a server-side push.

Chapter 12, Theming, explains how to use ExtGWT's existing UI themes, how to switch themes, and how to build a custom theme.

Appendix A, Event Handling — Making Those GUIs Do Something, explains ExtGWT's event-handling mechanism.

Appendix B, Custom Icons in GXT, explains how to add custom icons to your application.

Appendix C, GWT-RPC, describes GWT's RPC mechanism for client-server communication.

Appendix D, Jakarta Commons — FileUpload, demonstrates the use of Apache's FileUpload library for uploading files in a GWT application.

What you need for this book

To work with GWT, Java SDK needs to be installed. It can be downloaded from here:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

The GWT SDK as well as the GWT Eclipse plugin can be downloaded from here:

https://developers.google.com/web-toolkit/download

Sencha's ExtGWT library can be downloaded from the following location:

http://dev.sencha.com/deploy/gxt-2.2.5.zip

(The code recipes for this book were developed and tested with GWT 2.4, Java JDK 1.7, and GXT 2.2.5).

Who this book is for

This book is intended for the intermediate to advanced Java developer who wants to build really cool and powerful web apps using cutting-edge Java technology and web standards. Knowledge of basic web technologies and a working GWT setup is needed. Basic knowledge of ExtGWT will be an advantage.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Configure basic settings, such as a title with setHeading() and an initial dimension with setSize()."

A block of code is set as follows:

@Override
public void onModuleLoad() {
// create and set up window
Window basicWindow = new Window();
basicWindow.setHeading("GXT CookBook | Recipe One");
basicWindow.setClosable(true);
basicWindow.setSize(250, 50);

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "our dialog will be configured to use the OK and Cancel buttons combination, allowing the user to accept or decline the action presented by the dialog".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book — what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books — maybe a mistake in the text or the code — we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.