GWT 2.8.2 Declarative User Interface WebApp Development
The ebook provides 27 essential chapters that helps learner to build their skills in web application development using GWT, start from basic level of GWT. The ebook uses the detailed and easy to follow writing style to explain the content. Each chapter is accompanied by clear and concise source code that helps learner to learn the skills. Learner can expect to learn these skills: -Develop GWT application using Declarative User Interface. -Learn various tags for widgets. -Develop method to process event, controls the widget and data. -Develop single page web application. -Styles the GWT application with GSS. -Use tactful coding technique to manage RPC concurrency and Data Race. The content of ebook is based on the training titled "GWT 2.8.1 Declarative User Interface Web Application Development Self-Pace Training". However, the ebook is based on GWT 2.8.2 and available in PDF format. The ebook also provides some improvement on the existing source code. Buy the complete ebook with 27 chapters at http://millionstrengthknowledge.com/#path-r=ebook/gwt282/gwt282.html Intro to RPC Concurrency: https://www.youtube.com/watch?v=WPtc4jEPbq8 Intro to Data Race: https://www.youtube.com/watch?v=7ZguNy_QLlQ Complete Table of Content: https://drive.google.com/open?id=1eZJfYUSFu1yLEcXzLpGcPZkyaqABW1xI Preview source code: https://drive.google.com/open?id=17aoqPLkzaEBqleevHeiXPBDWJuHitZqe
The ebook provides 27 essential chapters that helps learner to build their skills in web application development using GWT, start from basic level of GWT. The ebook uses the detailed and easy to follow writing style to explain the content. Each chapter is accompanied by clear and concise source code that helps learner to learn the skills. Learner can expect to learn these skills:
-Develop GWT application using Declarative User Interface.
-Learn various tags for widgets.
-Develop method to process event, controls the widget and data.
-Develop single page web application.
-Styles the GWT application with GSS.
-Use tactful coding technique to manage RPC concurrency and Data Race.
The content of ebook is based on the training titled "GWT 2.8.1 Declarative User Interface Web Application Development Self-Pace Training". However, the ebook is based on GWT 2.8.2 and available in PDF format. The ebook also provides some improvement on the existing source code.
Buy the complete ebook with 27 chapters at http://millionstrengthknowledge.com/#path-r=ebook/gwt282/gwt282.html
Intro to RPC Concurrency: https://www.youtube.com/watch?v=WPtc4jEPbq8
Intro to Data Race: https://www.youtube.com/watch?v=7ZguNy_QLlQ
Complete Table of Content: https://drive.google.com/open?id=1eZJfYUSFu1yLEcXzLpGcPZkyaqABW1xI
Preview source code: https://drive.google.com/open?id=17aoqPLkzaEBqleevHeiXPBDWJuHitZqe
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Contents<br />
Author ........................................................................................................................................................ 1<br />
Learner ...................................................................................................................................................... 2<br />
Source code .............................................................................................................................................. 4<br />
Chapter 1: Introduction ..................................................................................................................... 6<br />
<strong>Development</strong> Tool .............................................................................................................................. 9<br />
Widget, Panel, Event ....................................................................................................................... 10<br />
Software used for the source code ........................................................................................... 14<br />
Source Code ........................................................................................................................................ 15<br />
Reference ............................................................................................................................................. 18<br />
Chapter 2: Create HTML Page using <strong>GWT</strong> ............................................................................... 20<br />
Generate <strong>GWT</strong> Application Project in Eclipse ..................................................................... 24<br />
Create <strong>GWT</strong> Module Descriptor File ........................................................................................ 29<br />
Create <strong>GWT</strong> Application Entry Point ....................................................................................... 39
Create Host HTML Page ................................................................................................................. 49<br />
Compile and Execute <strong>GWT</strong> Application .................................................................................. 58<br />
Chapter 3: Horizontal Panel, Vertical Panel, Grid Panel .................................................... 69<br />
<strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong> ............................................................................................................ 73<br />
XML Namespace ................................................................................................................................ 76<br />
Horizontal Panel ............................................................................................................................... 78<br />
Vertical Panel ..................................................................................................................................... 79<br />
Grid Panel ............................................................................................................................................ 80<br />
GwtPanel.java..................................................................................................................................... 83<br />
PanelEntryPoint.java ...................................................................................................................... 96<br />
Chapter 4: Data Entry Form ........................................................................................................ 104<br />
Label .................................................................................................................................................... 108<br />
TextBox .............................................................................................................................................. 111<br />
PasswordTextBox ......................................................................................................................... 113
RadioButton ..................................................................................................................................... 119<br />
TextArea ............................................................................................................................................ 121<br />
Button ................................................................................................................................................. 123<br />
HIdden ................................................................................................................................................ 125<br />
UIObject and FocusWidget Attribute ................................................................................... 127<br />
Theme Configuration in Module Descriptor ..................................................................... 137<br />
Chapter 5: Adding Event to Data Entry Form, and Read the Data ............................. 144<br />
Event ................................................................................................................................................... 148<br />
Define Event on Widget .............................................................................................................. 151<br />
Event Type........................................................................................................................................ 154<br />
Read Data from the Widgets .................................................................................................... 160<br />
Drag and Drop Events ................................................................................................................. 175<br />
Event Trace TextArea .................................................................................................................. 184<br />
Appendix: Installation Guide ...................................................................................................... 190
Introduction ..................................................................................................................................... 192<br />
JDK10 Installation ......................................................................................................................... 193<br />
Eclipse 4.7 Installation ................................................................................................................ 195<br />
<strong>GWT</strong> <strong>2.8.2</strong> SDK and <strong>GWT</strong> Eclipse Plugin Version 3 Installation ............................... 197<br />
Chrome Browser Installation ................................................................................................... 209<br />
Configure Default Internet Browser in Eclipse ................................................................ 210<br />
Appendix: Import Project into Eclipse ................................................................................... 215<br />
Index ...................................................................................................................................................... 227
<strong>GWT</strong> <strong>2.8.2</strong> <strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong> <strong>WebApp</strong> <strong>Development</strong><br />
Copyright © 2018, by MillionStrengthKnowledge.com, All rights reserved.<br />
The publication of the book and source code are protected by copyright, and permission must be<br />
obtained from the MillionStrengthKnowledge.com prior to any prohibited reproduction, storage in a<br />
retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying,<br />
recording, or likewise.<br />
Every effort has been made in the preparation of this book and source code to ensure the accuracy of<br />
the information presented. However, the information contained in this book and source code are sold<br />
without warranty and guarantee, either express or implied, as to the accuracy or completeness of or<br />
results to be obtained from using the book and source code. Neither the<br />
MillionStrengthKnowledge.com, author, nor its dealers and distributors will be held liable for any<br />
damages caused or alleged to be caused directly or indirectly by this book and source code. Under no<br />
circumstances shall MillionStrengthKnowledge.com, author, its dealers and distributors be liable for<br />
any indirect, incidental, special, punitive, consequential or similar damages that result from the use of<br />
or inability to use the book and source code, even if any of them has been advised of the possibility of
such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such<br />
claim or cause arises in contract, tort or otherwise.<br />
First published: November 2018<br />
https://millionstrengthknowledge.com<br />
Unique Number: 18790-01-63328-7
AUTHOR<br />
My name is Eric Fong. I started my career as a software developer since 2001. I have extensive<br />
experience with developing web application using Java and JavaEE. I received a Master Degree in<br />
Management Information System from Coventry University. I have these professional certificates:<br />
Oracle Certified Expert JavaEE6 EJB3.1 Developer, Oracle Certified Professional JavaSE8 Developer,<br />
Sun Certified Business Component Developer for J2EE, Sun Certified Web Component Developer for<br />
J2EE, and Sun Certified Programmer for Java 2 Platform 1.4.<br />
I am the founder of MillionStrengthKnowledge.com. I created the <strong>GWT</strong> 2.8.1 <strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong><br />
Web Application <strong>Development</strong> Self Pace Training in year 2017. I am very interested in Java and <strong>GWT</strong><br />
related application development, I enjoy doing research and development in Java and <strong>GWT</strong> during my<br />
spare time.<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 1
LEARNER<br />
The audience of this book is the people who want to learn web application development using <strong>GWT</strong>.<br />
This book uses <strong>GWT</strong> version <strong>2.8.2</strong>. The learner is required to have these pre-requisite knowledge:<br />
• Java 7/8<br />
• HTML, CSS<br />
Learner can learn these skills from the book:<br />
• Develop <strong>GWT</strong> application using <strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong>.<br />
• Learn various tags for widgets.<br />
• Develop method to process event, controls the widget and data.<br />
• Develop single page web application.<br />
• Styles the <strong>GWT</strong> application with GSS.<br />
• Use tactful coding technique to manage RPC concurrency and Data Race.<br />
When explaining the content of the book, author uses the term ‘learner” to refer to the reader of the<br />
book.<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 2
Please refer to “Appendix: Installation Guide” and “Appendix: Import Projects into Eclipse” to learn<br />
more about the software that are required to execute the source code, and how to import the source<br />
code into Eclipse.<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 3
SOURCE CODE<br />
The source code for preview can be downloaded in https://millionstrengthknowledge.com/#pathr=ebook/gwt282/gwt282.html.<br />
When the webpage is opened, search for “Ebook preview” section, then click on the “Preview source<br />
code” to download the source code in zip file format.<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 4
Download URL for<br />
preview source code<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 5
CHAPTER 1: INTRODUCTION<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 6
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 7
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 8
<strong>Development</strong> Tool<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 9
Widget, Panel, Event<br />
Widget<br />
Figure 1 Widget<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 10
panel<br />
Figure 2 Panel<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 11
Event<br />
Figure 3 Event<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 12
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 13
Software used for the source code<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 14
Source Code<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 15
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 16
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 17
Reference<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 18
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 19
CHAPTER 2: CREATE HTML PAGE<br />
USING <strong>GWT</strong><br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 20
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 21
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 22
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 23
Generate <strong>GWT</strong> Application Project in Eclipse<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 24
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 25
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 26
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 27
Classpath<br />
Figure 4 Classpath<br />
Project root package<br />
Figure 5 Project root package<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 28
Create <strong>GWT</strong> Module Descriptor File<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 29
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 30
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 31
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 32
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 33
<strong>GWT</strong> module descriptor file<br />
Figure 6 <strong>GWT</strong> module descriptor file<br />
Project root package<br />
Figure 7 Project root package<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 34
tag<br />
Figure 8 tag<br />
Logical module name<br />
Figure 9 Logical module name<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 35
ename-to attribute<br />
Figure 10 rename-to attribute<br />
tag<br />
Figure 11 tag<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 36
tag<br />
Figure 12 tag<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 37
Standard XML tag<br />
Figure 13 Standard XML tag<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 38
Create <strong>GWT</strong> Application Entry Point<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 39
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 40
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 41
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 42
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 43
GwtProgram.java<br />
Figure 14 GwtProgram.java<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 44
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 45
Multiple source paths<br />
Figure 15 Multiple source paths<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 46
EntryPoint class<br />
Figure 16 EntryPoint class<br />
onModuleLoad()<br />
Figure 17 onModuleLoad()<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 47
tag<br />
Figure 18 tag<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 48
Create Host HTML Page<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 49
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 50
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 51
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 52
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 53
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 54
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 55
tag<br />
Figure 19 tag<br />
Selection script<br />
Figure 20 Selection script<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 56
WEB-INF folder<br />
Figure 21 WEB-INF folder<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 57
Compile and Execute <strong>GWT</strong> Application<br />
Super development mode<br />
Figure 22 Super development mode<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 58
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 59
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 60
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 61
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 62
Refresh<br />
Figure 23 Refresh<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 63
Stop the code server<br />
Figure 24 Stop the code server<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 64
ename-to attribute<br />
Figure 25 rename-to attribute<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 65
Super development mode<br />
Figure 26 Super development mode<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 66
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 67
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 68
CHAPTER 3: HORIZONTAL PANEL,<br />
VERTICAL PANEL, GRID PANEL<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 69
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 70
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 71
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 72
<strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong><br />
<strong>Declarative</strong> user interface<br />
Figure 27 <strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong><br />
programmatic method<br />
Figure 28 Programmatic method<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 73
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 74
Owner class<br />
1 Owner class<br />
ui.xml<br />
2 ui.xml<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 75
XML Namespace<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 76
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 77
Horizontal Panel<br />
Single horizontal row<br />
Figure 29 Single horizontal row<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 78
Vertical Panel<br />
Single Vertical Column<br />
Figure 30 Single Vertical Column<br />
3 Single Vertical Column<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 79
Grid Panel<br />
Tabular format<br />
Figure 31 Tabular format<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 80
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 81
HTMLPanel<br />
Figure 32 HTMLPanel<br />
4 HTMLPanel<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 82
GwtPanel.java<br />
Owner class<br />
Figure 33 Owner class<br />
@UiTemplate annotation<br />
Figure 34 @UiTemplate annotation<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 83
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 84
Deferred binding<br />
Figure 35 Deferred binding<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 85
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 86
Factory static class<br />
Figure 36 Factory static class<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 87
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 88
CreateAndBindUi<br />
Figure 37 CreateAndBindUi<br />
@UiField<br />
Figure 38 @UiField<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 89
initWidget()<br />
Figure 39 initWidget()<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 90
java.util.logging.Logger<br />
Figure 40 java.util.logging.Logger<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 91
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 92
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 93
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 94
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 95
PanelEntryPoint.java<br />
Entry point<br />
Figure 41 Entry point<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 96
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 97
UiBinder Creation Wizard<br />
Figure 42 UiBinder Creation Wizard<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 98
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 99
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 100
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 101
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 102
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 103
CHAPTER 4: DATA ENTRY FORM<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 104
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 105
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 106
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 107
Label<br />
Label<br />
Figure 43 Label<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 108
horizontalAlignment<br />
Figure 44 horizontalAlignment<br />
directionEstimator<br />
Figure 45 directionEstimator<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 109
wordWrap<br />
Figure 46 wordWrap<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 110
TextBox<br />
TextBox<br />
Figure 47 TextBox<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 111
maxLength<br />
Figure 48 maxLength<br />
visibleLength<br />
Figure 49 visibleLength<br />
textAlignment<br />
Figure 50 textAlignment<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 112
PasswordTextBox<br />
PasswordTextBox<br />
Figure 51 PasswordTextBox<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 113
CheckBox<br />
Figure 52 CheckBox<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 114
formValue<br />
Figure 53 formValue<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 115
ListBox<br />
Figure 54 ListBox<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 116
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 117
multiSelect<br />
Figure 55 multiSelect<br />
visibleItemCount<br />
Figure 56 visibleItemCount<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 118
RadioButton<br />
Radio button<br />
Figure 57 Radio button<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 119
group<br />
Figure 58 group<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 120
TextArea<br />
TextArea<br />
Figure 59 TextArea<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 121
visibleLines<br />
Figure 60 visibleLines<br />
textAlignment<br />
Figure 61 textAlignment<br />
readOnly<br />
Figure 62 readOnly<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 122
Button<br />
Button<br />
Figure 63 Button<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 123
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 124
HIdden<br />
Hidden<br />
Figure 64 Hidden<br />
Invisible component<br />
Figure 65 Invisible component<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 125
defaultValue<br />
Figure 66 defaultValue<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 126
UIObject and FocusWidget Attribute<br />
UIObject<br />
Figure 67 UIObject<br />
FocusWidget<br />
Figure 68 FocusWidget<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 127
Width, height, visible, title<br />
Figure 69 Width, height, visible, title<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 128
tabIndex, enable<br />
Figure 70 tabIndex, enable<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 129
Grid panel<br />
Figure 71 Grid panel<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 130
VerticalPanel<br />
Figure 72 VerticalPanel<br />
HorizontalPanel<br />
Figure 73 HorizontalPanel<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 131
orderWidth<br />
Figure 74 borderWidth<br />
spacing<br />
Figure 75 spacing<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 132
horizontalAlignment<br />
Figure 76 horizontalAlignment<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 133
verticalAlignment<br />
Figure 77 verticalAlignment<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 134
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 135
orderWidth<br />
Figure 78 borderWidth<br />
cellSpacing<br />
Figure 79 cellSpacing<br />
cellPadding<br />
Figure 80 cellPadding<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 136
Theme Configuration in Module Descriptor<br />
Theme<br />
Figure 81 Theme<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 137
Clean Style<br />
Figure 82 Clean Style<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 138
Dark Style<br />
Figure 83 Dark Style<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 139
Standard Style<br />
Figure 84 Standard Style<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 140
Chrome Style<br />
Figure 85 Chrome Style<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 141
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 142
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 143
CHAPTER 5: ADDING EVENT TO<br />
DATA ENTRY FORM, AND READ THE<br />
DATA<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 144
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 145
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 146
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 147
Event<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 148
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 149
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 150
Define Event on Widget<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 151
The steps to declare ClickEvent<br />
Figure 86 The steps to declare ClickEvent<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 152
Multiple events<br />
Figure 87 Multiple events<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 153
Event Type<br />
ClickEvent, ChangeEvent, FocusEvent, BlurEvent<br />
Figure 88 ClickEvent, ChangeEvent, FocusEvent, BlurEvent<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 154
ValueChangeEvent, DragStartEvent, DragEndEvent, DropEvent<br />
Figure 89 ValueChangeEvent, DragStartEvent, DragEndEvent, DropEvent<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 155
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 156
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 157
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 158
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 159
Read Data from the Widgets<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 160
ui:field attribute<br />
Figure 90 ui:field attribute<br />
@UiField annotation<br />
Figure 91 @UiField annotation<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 161
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 162
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 163
getValue() method<br />
Figure 92 getValue() method<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 164
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 165
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 166
Specific method to read value<br />
Figure 93 Specific method to read value<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 167
getItemCount(), isItemSelected()<br />
Figure 94 getItemCount(), isItemSelected()<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 168
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 169
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 170
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 171
getSource() method<br />
Figure 95 getSource() method<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 172
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 173
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 174
Drag and Drop Events<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 175
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 176
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 177
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 178
Implement drag-and-drop event<br />
Figure 96 Implement drag-and-drop event<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 179
Data transfer storage<br />
Figure 97 Data transfer storage<br />
preventDefault() method<br />
Figure 98 preventDefault() method<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 180
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 181
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 182
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 183
Event Trace TextArea<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 184
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 185
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 186
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 187
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 188
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 189
APPENDIX: INSTALLATION GUIDE<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 190
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 191
Introduction<br />
major steps for the installation<br />
Figure 99 major steps for the installation<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 192
JDK10 Installation<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 193
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 194
Eclipse 4.7 Installation<br />
Download Eclipse<br />
Figure 100 Download Eclipse<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 195
Install Eclipse<br />
Figure 101 Install Eclipse<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 196
<strong>GWT</strong> <strong>2.8.2</strong> SDK and <strong>GWT</strong> Eclipse Plugin Version 3<br />
Installation<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 197
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 198
Install <strong>GWT</strong> Eclipse Plugin Version 3<br />
Figure 102 Install <strong>GWT</strong> Eclipse Plugin Version 3<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 199
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 200
Configure <strong>GWT</strong> <strong>2.8.2</strong> SDK in the Eclipse<br />
Figure 103 Configure <strong>GWT</strong> <strong>2.8.2</strong> SDK in the Eclipse<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 201
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 202
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 203
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 204
Configure <strong>GWT</strong> Plugin Setting to Ignore Missing gwt-servlet.jar Error<br />
Figure 104 Configure <strong>GWT</strong> Plugin Setting to Ignore Missing gwt-servlet.jar Error<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 205
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 206
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 207
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 208
Chrome Browser Installation<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 209
Configure Default Internet Browser in Eclipse<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 210
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 211
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 212
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 213
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 214
APPENDIX: IMPORT PROJECT INTO<br />
ECLIPSE<br />
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 215
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 216
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 217
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 218
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 219
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 220
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 221
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 222
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 223
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 224
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 225
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 226
INDEX<br />
Chapter 1: Introduction<br />
Widget ................................................................................ 10<br />
Panel .................................................................................... 11<br />
Event ................................................................................... 12<br />
Chapter 2: Develop HTML Page Using <strong>GWT</strong><br />
Classpath ........................................................................... 28<br />
Project root package .................................................... 28<br />
<strong>GWT</strong> module descriptor file ..................................... 34<br />
Project root package .................................................... 34<br />
tag .................................................................. 35<br />
Logical module name ................................................... 35<br />
rename-to attribute ...................................................... 36<br />
tag .................................................................. 36<br />
tag .................................................................... 37<br />
Standard XML tag .......................................................... 38<br />
GwtProgram.java ........................................................... 44<br />
Multiple source paths .................................................. 46<br />
EntryPoint class ............................................................. 47<br />
onModuleLoad() ............................................................ 47<br />
tag .......................................................... 48<br />
tag ...................................................................... 56<br />
Selection script ............................................................... 56<br />
WEB-INF folder .............................................................. 57<br />
Super development mode .......................................... 58<br />
Refresh ............................................................................... 63<br />
Stop the code server ..................................................... 64<br />
rename-to attribute ...................................................... 65<br />
Super development mode .......................................... 66<br />
Chapter 3: Horizontal Panel, Vertical Panel,<br />
Grid Panel<br />
<strong>Declarative</strong> <strong>User</strong> <strong>Interface</strong> ......................................... 73<br />
Programmatic method ................................................ 73<br />
Single horizontal row .................................................. 78<br />
Single Vertical Column ................................................ 79<br />
Tabular format................................................................ 80<br />
HTMLPanel ....................................................................... 82<br />
Owner class ...................................................................... 83<br />
@UiTemplate annotation ........................................... 83<br />
Deferred binding............................................................ 85<br />
Factory static class ........................................................ 87<br />
CreateAndBindUi ........................................................... 89<br />
@UiField ............................................................................ 89<br />
initWidget() ..................................................................... 90<br />
java.util.logging.Logger ............................................... 91<br />
Entry point ....................................................................... 96<br />
UiBinder Creation Wizard ......................................... 98<br />
Chapter 4: Data Entry Form<br />
Label………………………………………………………………..<br />
108<br />
horizontalAlignment .................................................. 109<br />
directionEstimator ...................................................... 109<br />
wordWrap ....................................................................... 110<br />
TextBox ............................................................................ 111<br />
maxLength ...................................................................... 112<br />
visibleLength ................................................................. 112<br />
textAlignment ................................................................ 112<br />
PasswordTextBox ........................................................ 113<br />
CheckBox ......................................................................... 114<br />
formValue ....................................................................... 115<br />
ListBox .............................................................................. 116<br />
multiSelect ...................................................................... 118<br />
visibleItemCount.......................................................... 118<br />
Radio button .................................................................. 119<br />
group ................................................................................. 120<br />
TextArea .......................................................................... 121<br />
visibleLines .................................................................... 122<br />
textAlignment ................................................................ 122<br />
readOnly .......................................................................... 122<br />
Button ............................................................................... 123<br />
Hidden .............................................................................. 125<br />
Invisible component ................................................... 125<br />
defaultValue ................................................................... 126<br />
UIObject ........................................................................... 127<br />
FocusWidget .................................................................. 127<br />
Width, height, visible, title ....................................... 128<br />
tabIndex, enable ........................................................... 129<br />
Grid panel ........................................................................ 130<br />
VerticalPanel ................................................................. 131<br />
HorizontalPanel ........................................................... 131<br />
borderWidth .................................................................. 132<br />
spacing.............................................................................. 132<br />
horizontalAlignment .................................................. 133<br />
verticalAlignment ........................................................ 134<br />
borderWidth .................................................................. 136
cellSpacing ...................................................................... 136<br />
cellPadding ..................................................................... 136<br />
Theme ............................................................................... 137<br />
Clean Style ...................................................................... 138<br />
Dark Style ........................................................................ 139<br />
Standard Style ............................................................... 140<br />
Chrome Style ................................................................. 141<br />
Download Eclipse ........................................................ 195<br />
Install Eclipse ................................................................ 196<br />
Install <strong>GWT</strong> Eclipse Plugin Version 3 ................. 199<br />
Configure <strong>GWT</strong> <strong>2.8.2</strong> SDK in the Eclipse ........... 201<br />
Configure <strong>GWT</strong> Plugin Setting to Ignore Missing<br />
gwt-servlet.jar Error ....................................... 205<br />
Chapter 5: Adding Event to Data Entry<br />
Form, and Read the Data<br />
The steps to declare ClickEvent ............................ 152<br />
Multiple events ............................................................. 153<br />
ClickEvent, ChangeEvent, FocusEvent, BlurEvent<br />
.................................................................................. 154<br />
ValueChangeEvent, DragStartEvent,<br />
DragEndEvent, DropEvent ........................... 155<br />
ui:field attribute ........................................................... 161<br />
@UiField annotation .................................................. 161<br />
getValue() method ...................................................... 164<br />
Specific method to read value ................................ 167<br />
getItemCount(), isItemSelected() ........................ 168<br />
getSource() method ................................................... 172<br />
Implement drag-and-drop event .......................... 179<br />
Data transfer storage ................................................. 180<br />
preventDefault() method ......................................... 180<br />
Appendix: Installation Guide<br />
major steps for the installation ............................. 192