SlideShare a Scribd company logo
1 of 237
Download to read offline
Contents
Author........................................................................................................................................................ 1
Learner...................................................................................................................................................... 2
Source code.............................................................................................................................................. 4
Chapter 1: Introduction ..................................................................................................................... 6
Development Tool.............................................................................................................................. 9
Widget, Panel, Event.......................................................................................................................10
Software used for the source code ...........................................................................................14
Source Code ........................................................................................................................................15
Reference.............................................................................................................................................18
Chapter 2: Create HTML Page using GWT ...............................................................................20
Generate GWT Application Project in Eclipse .....................................................................24
Create GWT Module Descriptor File........................................................................................29
Create GWT Application Entry Point.......................................................................................39
Create Host HTML Page.................................................................................................................49
Compile and Execute GWT Application..................................................................................58
Chapter 3: Horizontal Panel, Vertical Panel, Grid Panel....................................................69
Declarative User Interface............................................................................................................73
XML Namespace................................................................................................................................76
Horizontal Panel...............................................................................................................................78
Vertical Panel.....................................................................................................................................79
Grid Panel ............................................................................................................................................80
GwtPanel.java.....................................................................................................................................83
PanelEntryPoint.java......................................................................................................................96
Chapter 4: Data Entry Form........................................................................................................104
Label....................................................................................................................................................108
TextBox..............................................................................................................................................111
PasswordTextBox .........................................................................................................................113
RadioButton.....................................................................................................................................119
TextArea............................................................................................................................................121
Button.................................................................................................................................................123
HIdden................................................................................................................................................125
UIObject and FocusWidget Attribute ...................................................................................127
Theme Configuration in Module Descriptor .....................................................................137
Chapter 5: Adding Event to Data Entry Form, and Read the Data .............................144
Event...................................................................................................................................................148
Define Event on Widget..............................................................................................................151
Event Type........................................................................................................................................154
Read Data from the Widgets ....................................................................................................160
Drag and Drop Events.................................................................................................................175
Event Trace TextArea..................................................................................................................184
Appendix: Installation Guide ......................................................................................................190
Introduction.....................................................................................................................................192
JDK10 Installation.........................................................................................................................193
Eclipse 4.7 Installation................................................................................................................195
GWT 2.8.2 SDK and GWT Eclipse Plugin Version 3 Installation...............................197
Chrome Browser Installation...................................................................................................209
Configure Default Internet Browser in Eclipse................................................................210
Appendix: Import Project into Eclipse ...................................................................................215
Index......................................................................................................................................................227
GWT 2.8.2 Declarative User Interface WebApp Development
Copyright © 2018, by MillionStrengthKnowledge.com, All rights reserved.
The publication of the book and source code are protected by copyright, and permission must be
obtained from the MillionStrengthKnowledge.com prior to any prohibited reproduction, storage in a
retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying,
recording, or likewise.
Every effort has been made in the preparation of this book and source code to ensure the accuracy of
the information presented. However, the information contained in this book and source code are sold
without warranty and guarantee, either express or implied, as to the accuracy or completeness of or
results to be obtained from using the book and source code. Neither the
MillionStrengthKnowledge.com, author, nor its dealers and distributors will be held liable for any
damages caused or alleged to be caused directly or indirectly by this book and source code. Under no
circumstances shall MillionStrengthKnowledge.com, author, its dealers and distributors be liable for
any indirect, incidental, special, punitive, consequential or similar damages that result from the use of
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
claim or cause arises in contract, tort or otherwise.
First published: November 2018
https://millionstrengthknowledge.com
Unique Number: 18790-01-63328-7
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 1
AUTHOR
My name is Eric Fong. I started my career as a software developer since 2001. I have extensive
experience with developing web application using Java and JavaEE. I received a Master Degree in
Management Information System from Coventry University. I have these professional certificates:
Oracle Certified Expert JavaEE6 EJB3.1 Developer, Oracle Certified Professional JavaSE8 Developer,
Sun Certified Business Component Developer for J2EE, Sun Certified Web Component Developer for
J2EE, and Sun Certified Programmer for Java 2 Platform 1.4.
I am the founder of MillionStrengthKnowledge.com. I created the GWT 2.8.1 Declarative User Interface
Web Application Development Self Pace Training in year 2017. I am very interested in Java and GWT
related application development, I enjoy doing research and development in Java and GWT during my
spare time.
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 2
LEARNER
The audience of this book is the people who want to learn web application development using GWT.
This book uses GWT version 2.8.2. The learner is required to have these pre-requisite knowledge:
 Java 7/8
 HTML, CSS
Learner can learn these skills from the book:
 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.
When explaining the content of the book, author uses the term ‘learner” to refer to the reader of the
book.
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 3
Please refer to “Appendix: Installation Guide” and “Appendix: Import Projects into Eclipse” to learn
more about the software that are required to execute the source code, and how to import the source
code into Eclipse.
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 4
SOURCE CODE
The source code for preview can be downloaded in
https://millionstrengthknowledge.com/ebook/gwt282/gwt282.html
When the webpage is opened, search for “Ebook preview” section, then click on the “Preview source
code” to download the source code in zip file format.
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 5
Download URL for
preview source code
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 6
CHAPTER 1: INTRODUCTION
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 7
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 8
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 9
Development Tool
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 10
Widget, Panel, Event
Widget
Figure 1 Widget
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 11
panel
Figure 2 Panel
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 12
Event
Figure 3 Event
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 13
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 14
Software used for the source code
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 15
Source Code
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 16
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 17
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 18
Reference
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 19
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 20
CHAPTER 2: CREATE HTML PAGE
USING GWT
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 24
Generate GWT Application Project in Eclipse
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 28
Classpath
Figure 4 Classpath
Project root package
Figure 5 Project root package
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 29
Create GWT Module Descriptor File
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 34
GWT module descriptor file
Figure 6 GWT module descriptor file
Project root package
Figure 7 Project root package
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 35
<module> tag
Figure 8 <module> tag
Logical module name
Figure 9 Logical module name
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 36
rename-to attribute
Figure 10 rename-to attribute
<inherits> tag
Figure 11 <inherits> tag
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 37
<source> tag
Figure 12 <source> tag
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 38
Standard XML tag
Figure 13 Standard XML tag
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 39
Create GWT Application Entry Point
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 44
GwtProgram.java
Figure 14 GwtProgram.java
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 45
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 46
Multiple source paths
Figure 15 Multiple source paths
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 47
EntryPoint class
Figure 16 EntryPoint class
onModuleLoad()
Figure 17 onModuleLoad()
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 48
<entry-point> tag
Figure 18 <entry-point> tag
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 49
Create Host HTML Page
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 56
<script> tag
Figure 19 <script> tag
Selection script
Figure 20 Selection script
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 57
WEB-INF folder
Figure 21 WEB-INF folder
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 58
Compile and Execute GWT Application
Super development mode
Figure 22 Super development mode
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 63
Refresh
Figure 23 Refresh
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 64
Stop the code server
Figure 24 Stop the code server
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 65
rename-to attribute
Figure 25 rename-to attribute
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 66
Super development mode
Figure 26 Super development mode
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 67
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 68
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 69
CHAPTER 3: HORIZONTAL PANEL,
VERTICAL PANEL, GRID PANEL
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 73
Declarative User Interface
Declarative user interface
Figure 27 Declarative User Interface
programmatic method
Figure 28 Programmatic method
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 74
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 75
Owner class
1 Owner class
ui.xml
2 ui.xml
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 76
XML Namespace
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 77
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 78
Horizontal Panel
Single horizontal row
Figure 29 Single horizontal row
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 79
Vertical Panel
Single Vertical Column
Figure 30 Single Vertical Column
3 Single Vertical Column
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 80
Grid Panel
Tabular format
Figure 31 Tabular format
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 81
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 82
HTMLPanel
Figure 32 HTMLPanel
4 HTMLPanel
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 83
GwtPanel.java
Owner class
Figure 33 Owner class
@UiTemplate annotation
Figure 34 @UiTemplate annotation
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 84
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 85
Deferred binding
Figure 35 Deferred binding
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 86
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 87
Factory static class
Figure 36 Factory static class
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 88
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 89
CreateAndBindUi
Figure 37 CreateAndBindUi
@UiField
Figure 38 @UiField
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 90
initWidget()
Figure 39 initWidget()
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 91
java.util.logging.Logger
Figure 40 java.util.logging.Logger
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 96
PanelEntryPoint.java
Entry point
Figure 41 Entry point
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 97
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 98
UiBinder Creation Wizard
Figure 42 UiBinder Creation Wizard
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 104
CHAPTER 4: DATA ENTRY FORM
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 108
Label
Label
Figure 43 Label
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 109
horizontalAlignment
Figure 44 horizontalAlignment
directionEstimator
Figure 45 directionEstimator
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 110
wordWrap
Figure 46 wordWrap
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 111
TextBox
TextBox
Figure 47 TextBox
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 112
maxLength
Figure 48 maxLength
visibleLength
Figure 49 visibleLength
textAlignment
Figure 50 textAlignment
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 113
PasswordTextBox
PasswordTextBox
Figure 51 PasswordTextBox
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 114
CheckBox
Figure 52 CheckBox
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 115
formValue
Figure 53 formValue
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 116
ListBox
Figure 54 ListBox
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 117
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 118
multiSelect
Figure 55 multiSelect
visibleItemCount
Figure 56 visibleItemCount
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 119
RadioButton
Radio button
Figure 57 Radio button
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 120
group
Figure 58 group
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 121
TextArea
TextArea
Figure 59 TextArea
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 122
visibleLines
Figure 60 visibleLines
textAlignment
Figure 61 textAlignment
readOnly
Figure 62 readOnly
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 123
Button
Button
Figure 63 Button
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 124
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 125
HIdden
Hidden
Figure 64 Hidden
Invisible component
Figure 65 Invisible component
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 126
defaultValue
Figure 66 defaultValue
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 127
UIObject and FocusWidget Attribute
UIObject
Figure 67 UIObject
FocusWidget
Figure 68 FocusWidget
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 128
Width, height, visible, title
Figure 69 Width, height, visible, title
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 129
tabIndex, enable
Figure 70 tabIndex, enable
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 130
Grid panel
Figure 71 Grid panel
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 131
VerticalPanel
Figure 72 VerticalPanel
HorizontalPanel
Figure 73 HorizontalPanel
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 132
borderWidth
Figure 74 borderWidth
spacing
Figure 75 spacing
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 133
horizontalAlignment
Figure 76 horizontalAlignment
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 134
verticalAlignment
Figure 77 verticalAlignment
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 135
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 136
borderWidth
Figure 78 borderWidth
cellSpacing
Figure 79 cellSpacing
cellPadding
Figure 80 cellPadding
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 137
Theme Configuration in Module Descriptor
Theme
Figure 81 Theme
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 138
Clean Style
Figure 82 Clean Style
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 139
Dark Style
Figure 83 Dark Style
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 140
Standard Style
Figure 84 Standard Style
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 141
Chrome Style
Figure 85 Chrome Style
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 142
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 143
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 144
CHAPTER 5: ADDING EVENT TO
DATA ENTRY FORM, AND READ THE
DATA
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 148
Event
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 149
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 150
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 151
Define Event on Widget
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 152
The steps to declare ClickEvent
Figure 86 The steps to declare ClickEvent
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 153
Multiple events
Figure 87 Multiple events
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 154
Event Type
ClickEvent, ChangeEvent, FocusEvent, BlurEvent
Figure 88 ClickEvent, ChangeEvent, FocusEvent, BlurEvent
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 155
ValueChangeEvent, DragStartEvent, DragEndEvent, DropEvent
Figure 89 ValueChangeEvent, DragStartEvent, DragEndEvent, DropEvent
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 160
Read Data from the Widgets
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 161
ui:field attribute
Figure 90 ui:field attribute
@UiField annotation
Figure 91 @UiField annotation
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 162
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 163
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 164
getValue() method
Figure 92 getValue() method
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 165
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 166
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 167
Specific method to read value
Figure 93 Specific method to read value
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 168
getItemCount(), isItemSelected()
Figure 94 getItemCount(), isItemSelected()
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 172
getSource() method
Figure 95 getSource() method
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 173
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 174
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 175
Drag and Drop Events
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 179
Implement drag-and-drop event
Figure 96 Implement drag-and-drop event
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 180
Data transfer storage
Figure 97 Data transfer storage
preventDefault() method
Figure 98 preventDefault() method
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 184
Event Trace TextArea
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 190
APPENDIX: INSTALLATION GUIDE
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 191
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 192
Introduction
major steps for the installation
Figure 99 major steps for the installation
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 193
JDK10 Installation
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 194
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 195
Eclipse 4.7 Installation
Download Eclipse
Figure 100 Download Eclipse
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 196
Install Eclipse
Figure 101 Install Eclipse
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 197
GWT 2.8.2 SDK and GWT Eclipse Plugin Version 3
Installation
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 198
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 199
Install GWT Eclipse Plugin Version 3
Figure 102 Install GWT Eclipse Plugin Version 3
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 200
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 201
Configure GWT 2.8.2 SDK in the Eclipse
Figure 103 Configure GWT 2.8.2 SDK in the Eclipse
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 205
Configure GWT Plugin Setting to Ignore Missing gwt-servlet.jar Error
Figure 104 Configure GWT Plugin Setting to Ignore Missing gwt-servlet.jar Error
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 209
Chrome Browser Installation
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 210
Configure Default Internet Browser in Eclipse
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
Copyright © 2018 by MillionStrengthKnowledge.com, All rights reserved. 215
APPENDIX: IMPORT PROJECT INTO
ECLIPSE
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
Chapter 1: Introduction
Widget................................................................................ 10
Panel.................................................................................... 11
Event................................................................................... 12
Chapter 2: Develop HTML Page Using GWT
Classpath........................................................................... 28
Project root package.................................................... 28
GWT module descriptor file ..................................... 34
Project root package.................................................... 34
<module> tag .................................................................. 35
Logical module name................................................... 35
rename-to attribute...................................................... 36
<inherits> tag.................................................................. 36
<source> tag .................................................................... 37
Standard XML tag.......................................................... 38
GwtProgram.java........................................................... 44
Multiple source paths.................................................. 46
EntryPoint class............................................................. 47
onModuleLoad()............................................................ 47
<entry-point> tag .......................................................... 48
<script> tag ...................................................................... 56
Selection script............................................................... 56
WEB-INF folder.............................................................. 57
Super development mode.......................................... 58
Refresh............................................................................... 63
Stop the code server..................................................... 64
rename-to attribute...................................................... 65
Super development mode.......................................... 66
Chapter 3: Horizontal Panel, Vertical Panel,
Grid Panel
Declarative User Interface......................................... 73
Programmatic method................................................ 73
Single horizontal row .................................................. 78
Single Vertical Column................................................ 79
Tabular format................................................................ 80
HTMLPanel....................................................................... 82
Owner class...................................................................... 83
@UiTemplate annotation........................................... 83
Deferred binding............................................................ 85
Factory static class........................................................ 87
CreateAndBindUi........................................................... 89
@UiField............................................................................ 89
initWidget() ..................................................................... 90
java.util.logging.Logger............................................... 91
Entry point ....................................................................... 96
UiBinder Creation Wizard ......................................... 98
Chapter 4: Data Entry Form
Label………………………………………………………………..
108
horizontalAlignment..................................................109
directionEstimator......................................................109
wordWrap.......................................................................110
TextBox............................................................................111
maxLength......................................................................112
visibleLength .................................................................112
textAlignment................................................................112
PasswordTextBox........................................................113
CheckBox.........................................................................114
formValue .......................................................................115
ListBox..............................................................................116
multiSelect......................................................................118
visibleItemCount..........................................................118
Radio button..................................................................119
group.................................................................................120
TextArea ..........................................................................121
visibleLines ....................................................................122
textAlignment................................................................122
readOnly..........................................................................122
Button...............................................................................123
Hidden..............................................................................125
Invisible component...................................................125
defaultValue...................................................................126
UIObject ...........................................................................127
FocusWidget..................................................................127
Width, height, visible, title.......................................128
tabIndex, enable...........................................................129
Grid panel........................................................................130
VerticalPanel .................................................................131
HorizontalPanel ...........................................................131
borderWidth..................................................................132
spacing..............................................................................132
horizontalAlignment..................................................133
verticalAlignment........................................................134
borderWidth..................................................................136
cellSpacing......................................................................136
cellPadding.....................................................................136
Theme...............................................................................137
Clean Style ......................................................................138
Dark Style........................................................................139
Standard Style...............................................................140
Chrome Style .................................................................141
Chapter 5: Adding Event to Data Entry
Form, and Read the Data
The steps to declare ClickEvent............................152
Multiple events.............................................................153
ClickEvent, ChangeEvent, FocusEvent, BlurEvent
..................................................................................154
ValueChangeEvent, DragStartEvent,
DragEndEvent, DropEvent ...........................155
ui:field attribute...........................................................161
@UiField annotation..................................................161
getValue() method......................................................164
Specific method to read value................................167
getItemCount(), isItemSelected() ........................168
getSource() method ...................................................172
Implement drag-and-drop event..........................179
Data transfer storage.................................................180
preventDefault() method.........................................180
Appendix: Installation Guide
major steps for the installation.............................192
Download Eclipse........................................................195
Install Eclipse................................................................196
Install GWT Eclipse Plugin Version 3 .................199
Configure GWT 2.8.2 SDK in the Eclipse ...........201
Configure GWT Plugin Setting to Ignore Missing
gwt-servlet.jar Error .......................................205
GWT 2.8.2 Declarative User Interface WebApp Development (FREE PREVIEW)
GWT 2.8.2 Declarative User Interface WebApp Development (FREE PREVIEW)

More Related Content

Similar to GWT 2.8.2 Declarative User Interface WebApp Development (FREE PREVIEW)

Practical seo-copywriting-v1.1
Practical seo-copywriting-v1.1Practical seo-copywriting-v1.1
Practical seo-copywriting-v1.1Kim Cao
 
How To Tame Pinterest
How To Tame PinterestHow To Tame Pinterest
How To Tame Pinterestsmartbird
 
Big data analytics infrastructure for dummies
Big data analytics infrastructure for dummiesBig data analytics infrastructure for dummies
Big data analytics infrastructure for dummiesLuke Farrell
 
New Abortion care guidelines of 2022.pdf
New Abortion care guidelines of 2022.pdfNew Abortion care guidelines of 2022.pdf
New Abortion care guidelines of 2022.pdfEndex Tam
 
Advance SEO Techniques
Advance SEO TechniquesAdvance SEO Techniques
Advance SEO TechniquesGoogle
 
User-Story-Primer.pdf
User-Story-Primer.pdfUser-Story-Primer.pdf
User-Story-Primer.pdfAnurag Behera
 
How to Get Free Advertising for Your Small Business Today!
How to Get Free Advertising for Your Small Business Today!How to Get Free Advertising for Your Small Business Today!
How to Get Free Advertising for Your Small Business Today!Tim Harrelson
 
Social Media in Training & Development
Social Media in Training & DevelopmentSocial Media in Training & Development
Social Media in Training & DevelopmentGideon For-mukwai, CEM
 
Edo scope and sequence advanced
Edo scope and sequence advancedEdo scope and sequence advanced
Edo scope and sequence advancednicolasmunozvera
 
Live@edu ilm2007
Live@edu ilm2007Live@edu ilm2007
Live@edu ilm2007Victory Lee
 
Midmarket Collaboration for Dummies
Midmarket Collaboration for DummiesMidmarket Collaboration for Dummies
Midmarket Collaboration for DummiesLiberteks
 
Cooking Mastery.pdf
Cooking Mastery.pdfCooking Mastery.pdf
Cooking Mastery.pdfjohn314559
 
Aulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdf
Aulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdfAulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdf
Aulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdffawaznasser
 
Internet Performance for Dummies
Internet Performance for DummiesInternet Performance for Dummies
Internet Performance for DummiesLiberteks
 
H1 2009 Malware And Spam Review1
H1 2009 Malware And Spam Review1H1 2009 Malware And Spam Review1
H1 2009 Malware And Spam Review1Bitdefender
 

Similar to GWT 2.8.2 Declarative User Interface WebApp Development (FREE PREVIEW) (20)

Practical seo-copywriting-v1.1
Practical seo-copywriting-v1.1Practical seo-copywriting-v1.1
Practical seo-copywriting-v1.1
 
How To Tame Pinterest
How To Tame PinterestHow To Tame Pinterest
How To Tame Pinterest
 
Big data analytics infrastructure for dummies
Big data analytics infrastructure for dummiesBig data analytics infrastructure for dummies
Big data analytics infrastructure for dummies
 
New Abortion care guidelines of 2022.pdf
New Abortion care guidelines of 2022.pdfNew Abortion care guidelines of 2022.pdf
New Abortion care guidelines of 2022.pdf
 
Advance SEO Techniques
Advance SEO TechniquesAdvance SEO Techniques
Advance SEO Techniques
 
Lisp Book
Lisp BookLisp Book
Lisp Book
 
User-Story-Primer.pdf
User-Story-Primer.pdfUser-Story-Primer.pdf
User-Story-Primer.pdf
 
How to Get Free Advertising for Your Small Business Today!
How to Get Free Advertising for Your Small Business Today!How to Get Free Advertising for Your Small Business Today!
How to Get Free Advertising for Your Small Business Today!
 
Social Media in Training & Development
Social Media in Training & DevelopmentSocial Media in Training & Development
Social Media in Training & Development
 
Advanced API Security
Advanced API SecurityAdvanced API Security
Advanced API Security
 
Edo scope and sequence advanced
Edo scope and sequence advancedEdo scope and sequence advanced
Edo scope and sequence advanced
 
Live@edu ilm2007
Live@edu ilm2007Live@edu ilm2007
Live@edu ilm2007
 
Midmarket Collaboration for Dummies
Midmarket Collaboration for DummiesMidmarket Collaboration for Dummies
Midmarket Collaboration for Dummies
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
Cooking Mastery.pdf
Cooking Mastery.pdfCooking Mastery.pdf
Cooking Mastery.pdf
 
Aulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdf
Aulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdfAulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdf
Aulton_39_s_Pharmaceutics_The_Design_and_Manufacture_of_Medicines_compressed.pdf
 
Swift iso20022 for_dummies_2020
Swift iso20022 for_dummies_2020Swift iso20022 for_dummies_2020
Swift iso20022 for_dummies_2020
 
Cooking Mastery Book
Cooking Mastery BookCooking Mastery Book
Cooking Mastery Book
 
Internet Performance for Dummies
Internet Performance for DummiesInternet Performance for Dummies
Internet Performance for Dummies
 
H1 2009 Malware And Spam Review1
H1 2009 Malware And Spam Review1H1 2009 Malware And Spam Review1
H1 2009 Malware And Spam Review1
 

Recently uploaded

Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escortsindian call girls near you
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

GWT 2.8.2 Declarative User Interface WebApp Development (FREE PREVIEW)

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