Tags: abstract class, anonymous classes, apache 99, apache foundation, apache tomcat, api, appl, application loading, architecture, assertion, directory structure, interface, servlet, shell script, testing and debugging, widget, wildcard,
index
Symbols anonymous classes, reason to testing and debugging in
avoid 423 hosted mode 8694
$wnd.__dispatchEvent() 200 Ant 48, 99 application-compile script 62
$wnd__dispatchEvent() 199 ant flag 48 applicationCreator tool 30, 44,
* wildcard 549 Apache 99 46, 48, 50, 53, 62, 353, 543
@typeArgs 359, 362363 Apache Foundation 462 application-loading
Apache Tomcat 548 mechanism 564572
A directory structure 550 application-shell script 62
servlet engine 87 architecture 376
About 133134 API, exposing 278, 294 ArrayList 362
About menu, automatic Appl-i18n tool 45 assertion methods 533
generation of 472 application assignable type 475
altering for locale 518520 AsyncCallback interface
AbsolutePanel 171
369, 384385, 388391
add(Widget, x, y) 171 compiling 9498
asynchronous code
getWidgetLeft() 171 constructing 7283
testing 537539
getWidgetTop() 171 creating 44, 50, 5463 asynchronous communication
setPosition(Widget, x, y) 171 cross-script 572 348, 350351
abstract class 133 defining server asynchronous mode 537
AbstractAsyncHandler 389 resources 326327 asynchronous service
AbstractImagePrototype 130 deploying 9899, 539553 interface 367, 371
add() 160161 developing 6786 asynchronous testing 537539
add(Widget,String) 172 executing in debug mode 92 automatic updates 394
addChangeListener 259 implementing
addDashboardComponent() internationalization 5657
B
190 internationalization 5456
addMenu() 275 large 67 bin directory 550
Address Book 136, 218, 232 legacy 565 Black Hat convention 352
handling scrolling 225 loading mechanism 564572 blacklist argument 88
handling tab events 232 logging 100103 _blank frame name 421, 430
addRowToGrid() 380 manaing GTP blocking 392
addStyleName() method 85 properties 327332 comparison to polling 398
adopting widgets 184 running in web mode 99 implementing on client 399
Ajax 111, 113 setting entry point 337 implementing on server
with RequestBuilder 410424 standard 566567 399401
AlphaImageLoader filter 149 styling 8386 server threads 398401
581
582 INDEX
Book application 125, 235 callbacks ClickListenerCollection 213
managing tree events 235 chaining 386388 fireClick() 213
bookmarks 417 handler 373, 416 client code, structuring 376391
Bookmarks menu mechanism 385 client package 364
designing 417418 object, creating 369370 client, implementing
XML data file 418419 routine, using Command blocking 399
boolean readBoolean() 406 Pattern 384391 client-pull 393
booleanValue() 447 cancelLabelChange() 262 client-side RPC architecture 375
bootstrapping, standard canProcess() 400 code
applications 567572 capturing compiling 9498
breakpoints, setting 92 long text 433 deploying 9899
browser text 432 ColourPicker 270
change title of 128 Cascading Style Sheets constructing 273274
communicating via GWT (CSS) 42, 80, 85, 355 com.google.gwt.http.HTTP 455
Java 291292 class-naming convention 268 Comet 393
communicating via styling widgets 117 Command 122
JavaScript 292293 CellFormatter 179 execute() 122
detection of type 560 CellPanel 176 command class 388
determining which is being HasHorizontalAlignment 177 Command interface
used 330 HasVerticalAlignment 177 81, 419420
managing differences CGI 410 command object 385
496502 CGI (Perl module) 466 Command pattern 122, 376,
tab index 133 chaining callbacks 386388 384, 386391
browser events, handling ChangeListener commons-fileupload library 436
standard 216231 136, 218221, 259 commons-httpclient library 461
browser functionality, addChangeListener() 265 compilation 94
accessing 278 fireChange() 272 -gen 96
onChange() 219 GWT 556564
browser-specific code 328
ChangeListenerCollection GWT, file mapping 557
builder, creating 414
259, 265 GWT, output 559
Button 35, 248, 252, 427, 454
changeTextLabel() 263 heap size errors 97
click() 138
char readChar() 406 -logLevel 95
GWT Java class 112
Character.isDigit() 141 -out 96
Java object 112
characters, escaping 412 output infomration in tree
, DOM element 114 CheckBox 138 format 95
Button widget 78, 80, 137138 for boolean values 433434 setting level of logging 95
ButtonPanel 186 class replacement, DOM 332 setting location for generated
creating 183185 classes code 96
byte readByte() 406 abstract 390 setting location of output
locale-specific 519520 code 96
C schedulable 395398 setting the style of output
classpath code 96
cache.html 563 confusion with GWT speeding up the process of 97
cache.xml files 561563 modules 322 -style 96
identification of browser relation to GWT module -treeLogger 95
choices 563 file 83 viewing results 9798
Calculator 138, 140, 221, 223 ClickListener 36, 212213, compilation process
handling clicks 221 221222, 252, 454, 460 benefits of 561
managing keyboard addClickListener() 213 drawbacks of 561
events 223 removeClickListener() 213 compilation script 95
INDEX 583
compiler 6 continuously updated DashboardPanel 204, 208,
flags 573 component 393398 215, 222, 274, 298, 477
making output more convention 388 debugging 9294
readable 573 CPAN 467 deploying the code 9899
web mode 573 createConfirmButton() 262 description 6567
compiling 9498 createImage() 130 developing your
complex panels 162 createMessages flag 56 application 6786
complexity, reducing 382 createOptionsMenu() 488 directory structure 51, 59
ComplexPanel 170178 creation tools 39 drag and drop 65
component shell, writing application creator 44, 48, EditableLabel
377380 50, 53, 62 131, 247249, 253
components i18nCreator 511 building 250, 258269
continuously updated internationalization change text
393398 creator 45, 5455, 62 notification 220
labels, adding 380382 project creator 44, 4748, 50 choosing panel layout and
shell, writing 377380 unit testing 45, 5758, 62 structure 253255
style, adding 380382 cross-script applications 572 creating 259260, 263
Composite 378 cross-site request forgery 351 FlowPanel 173
initWidget() 248 CSS. See Cascading Style Sheets identifying
composite panels 162, 181182 (CSS) components 251253
custom field serializer 402407 implementing GWT Java
composite widgets 247, 251
class rules 403 interfaces 255258
building 258265
reasons to write 402 multiple text lines 140
creating 262
CustomFieldSerializer 403
creating from other compos- styling 267269
ite widgets 269274 externalvisibility
definition 247 D property 123, 521, 563, 569
development steps 248249 final version 522523
initializing 263 Dasboard.html 558 Finance News 518
Dashboard 5053, 74, 95, Flash movie widget 496
initWidget() 263
97, 103, 522 FlashMovieImpl 499
layout 253
About 133134
setWidget(), deprecated 263 generator 477492
About menu 472
styling 267269 getConfirmDelete() 298
adding JUnit tests 57
conf directory 550 getDashboardName() 296
Address Book 135136,
configuration 14 168, 206, 218, 225, 232 Google Video Search
configuring production Book 125, 235 308, 336
environment 550552 bookmark menu 124 importing into Eclipse 60
confirmDelete 190 Calculator 138, 140, 167, internationalization
constants 181, 221, 223 5457, 6872
avoiding writing directly 503 Colour Picker 269 internet view 520
moving to resource file 503 compiling the code 9498 intranet view 520
referring to as string component applications key functionality 65
literals 503 6566, 81 languages 54
Constants interface 14 confirmDelete 297 Login 140, 173, 177
containsKey() 450 creating panel for 187190 menu system 65, 121
content delivery Dashboard_APITest.html 296 module XML file 337339
client-pull 393 Dashboard_intranet onEventPreview 209
server-push 392393 class 123, 523 passing data between inde-
techniques 392 DashboardComposite pendent applications 297
content-type 415 274276, 334, 477 PNGImage 147148
Content-type header 414 DashboardContainer 188 processing XML 65
584 INDEX
Dashboard (continued) onMouseMove 240 determining browser 330
running in hosted mode onMouseUp 240 development lifecycle. See lifecy-
9091 Dashboard-shell 90 cle
running in web mode 99 altering classpath 340 DialogBox 164166
Search Comparison 174 Dashboard-shell script 87 creating 165
Server Status 131, 164, 180, data Dictionary 15, 517
232, 234, 327 hiding with Hidden 435436 get(key) 517
setConfirmDelete() 298 pagination 180 getDictionary 517
setDashboardName() 295 data objects 348 DiskFileItemFactory 438
Slider 270273 JSON 445450 disowning widgets 184
Slideshow 119, 128, 563 serializable 356360 160
Stage 6 99 DBIx::JSON 467 div element 78
testing and debugging in host debugging DockPanel 175177
mode 8694 hosted mode 8694 DOM
ToggleMenuItem using JUnit messages 532 browsers dealing with 332
150151, 154155 using rebind decision browser-specific methods 497
Tooltip 231 files 542 creating an element 144
Trash Icon 216 DeckPanel 170, 173174 div element 78
getVisibleWidget() 174 eventCancelBubble() 200
TwoComponentMenuItem
showWidget(int) 174 eventPreventDefault() 200
124, 150153, 177
decodeComponent() 412 getElement() 144
Dashboard.css file 84
default application getting specific named 171
Dashboard.gwt.xml file
HTML file 7277 implementation class
72, 81, 86
Java file 7781 hierarchy 497
Dashboard.html file 7273, 86 named 74
module XML file 72, 8183
Dashboard.java file 72, 77 setAttribute() 144
default browser event,
Dashboard_APITest.html 294 DOM pages, getting
preventing 216
Dashboard-compile, altering defaultexcludes attribute 326 reference 171
classpath 340 deferred binding 71, 149 DOMImplIE6 280
DashboardComposite 334 creating DOM class DOMImplStandard 197, 280
definition of 274276 instances 497 double readDouble() 406
DashboardCompositeGenerator with generators 474, 491 drag-and-drop
334 DeferredCommand 272 drag 236241
DashboardConstants interface define-property tag 495 drop 241244
file 80 defining implementing 236244
DashboardConstants.java new properties 328 DummyCommand 81
file 68, 72 server resource 327 dynamic string
DashboardConstants.properties deploying internationalization
69, 506 applications 539553 516518
DashboardConstants_sv.proper- code 9899
ties 507 to a filesystem 99 E
DashboardConstants-i18n to a web server 98
tool 5556, 6870, 508 deployment descriptor 549 Echo2 26
DashboardContainer 188 writing 552553 Eclipse
DashboardMessages.properties deserialization 350, 402 importing into 6061
512 pattern 404 launch configuration 51
DashboardMessages-i18n 512 deserialize() 403404, 406407 launch files 534
DashboardPanel 200, 274, 298 Design Patterns: Elements of -eclipse flag 39, 47, 51, 59, 61
gaining and losing focus 222 Reusable Object-Oriented EditableLabel 140, 220
ignoring event 208 Software 382 managing change 220
onMouseDown 239 DETAILED option 90 EMBED tag 498
INDEX 585
encapsulating remote calls eventGetClientY 205 onError 127
382384 eventGetCtrlKey 205 onEventPreview() 208
encodeComponent() 412413 eventGetFromElement 205 ONFOCUS 194
encoding-type 436 eventGetKeyCode 205 onHistoryChange() 119
endless loop, creating 400 eventGetRepeat 205 ONKEYDOWN 194
entry point eventGetScreenX 205 ONKEYPRESS 194
setting 337 eventGetScreenY 205 ONKEYUP 194
EntryPoint interface 34, 78 eventGetShiftKey 205 ONLOAD 194
class 80 eventGetTarget 205 onLoad 127
errors, handling with tests eventGetToElement 206 ONLOSECAPTURE 194
532533 eventGetType() 204, 206 ONMOUSEDOWN 194
escaped values eventGetTypeString 206 ONMOUSEMOVE 194
decoding 412 eventPreventDefault() ONMOUSEOUT 194
encoding 412 200, 216 ONMOUSEOVER 194
escaping 413 EventPreview 208210 ONMOUSEUP 194
characters 412 finding a listener 199 ONSCROLL 194
URLs 412 FOCUSEVENTS 194 PopupListener 232
event handling, preventing FocusListener 215, 275 preventing previewing 188
default in browser 216 form events 231 previewing 208210
event listeners getting the type of 204 ScrollListeners 224226
ChangeListener 136 GWT event model 196200 sinkEvent() 197, 202
ClickListener 131, 138 GWT handling lifecycle 197 sinkEvents() 197, 200203
HistoryListener 119 handling 193, 199 sinking 200203
KeyboardListenerAdapter handling by extending lis- super.onBrowserEvent() 197
141 tener classes 211212 tab events 232233
LoadListener 127 handling double click 200 table events 234
MouseListener 131 handling standard browser TableListener 178, 234
PopupListener 124 events 216231 TabListener 181
TreeListener 126 identifying event model tree events 235236
Event object 204 browser differences TreeListener 235
eventBits attribute 114, 202 195196 unsinkEvents() 205
__eventBits field 203 KeyboardListener 140, 168 W3C DOM model 196
EventListener 211, 214 KEYEVENTS 194 window close events 227231
EventPreview 208210 linking sunk events to Window CloseListener 293
events 193 onBrowserEvent() 207208 window resize events 226227
addEventListener() 196197 listening 200216 WindowCloseListener
bubbling 195 LoadListener 223 227231
BUTTON_LEFT 193 managing sunk events WindowResizeListener
BUTTON_MIDDLE 193 203207 226227, 271
BUTTON_RIGHT 193 MOUSEEVENTS 194 examples
capturing 195 MouseListener 211 applicationCreator 30
capturing right mouse moving into GWT code Server Status 353356
clicks 206 212216 Tic-Tac-Toe 32
ChangeListener 218221 ONBLUR 193 exceptions
ClickListener 212 onBrowserEvent() 197, 199, JSNI 290
closing pop-ups 231232 203, 207208 serializable 363
dispatchEvent() 197 ONCHANGE 193 throwing 363
eventCancelBubble() 200 ONCLICK 193 excludes 326
eventGetAltKey 205 ONDBLCLICK 194 execute() 420
eventGetButton 205 onDetach() 200 existing methods,
eventGetClientX 205 ONERROR 194 overwriting 484485
586 INDEX
exposing an API 294 flexibility, adding 390 G
extending properties 329 FlexTable 179180
extend-property tag 495 FlexCellFormatter 180 gen argument 90, 96
Extensible Messaging and Pres- Flickr, label editing 250 generate() 476
ence Protocol (XMPP) 342 float readFloat() 407 generating new code
externalvisibility property 95 FlowPanel 159160, automatically 471491
extractYahooResults() 458 173, 253, 454 GeneratorContext 478
getWidget(int) 173 generators 472
F getWidgetCount() 173 amending classpath to
getWidgetIndex(Widget) 173 use 473
Façade pattern 376, 382384 remove(int widgetIndex) 173 basic code 476
failure, different than an setting style of 263 context argument 476
error 532 FocusListener 215, 222, 275 context properties 479480
field serializers onFocus() 275 DashboardComposite-
onLostFocus() 275 Generator 334
class 403404
FocusPanel 164, 167168 deferred binding with 474
custom 402407
setFocus() 168 generate() 478
custom, class rules 403
setTabIndex() 168 generating classes 563
custom, implementing
GeneratorContext object 478
404407 FocusWidget 133141, 143, 167
input class 478479
custom, reasons to write 402 setAccessKey() 133
internationalization 472
file uploads 436 setFocus() 133
introduction 472473
file-input tag 425 setTabIndex() 133
JUnit 472
FileItemFactory 438 425
logging progress 480482
files, uploading with form action 426
logging to a TreeLogger 476
FileUpload 436439 form controls 425426
makeInterface() 483
filesystem, deploying to 99 form encoding 415 PrintWriter 483
FileUpload 118119, 436439 form method 425 PropertyOracle object 479
getFilename() 119 FormHandler 428 registering 333334, 474
getName() 119 onSubmit() 428 returning new class 491492
old version 143146 onSubmitComplete() 428 returning null as the
server-side component 118 FormPanel 164, 166167, result 476
setName() 119 410, 424439 RPC 472
FileUploadException 438 events 428429 SourceWriter 478, 482
FileUploadServlet class 118 form controls 432439 TreeLogger 480
filtering public resources 326 setAction() 426 TypeOracle 478
finishTest() 538 setMethod() 426 generics 358
fireChange() 265 submit() 167, 427 GET 411413
Firefox Web Developer submitting 427 compared to POST 413414
extension 73 target, altering 429431 get() 171, 450
Flash widget FormPanel.METHOD_GET 426 get(elementName) 171
building 498501 FormPanel.METHOD_POST getAttribute() 144
Internet Explorer 498 426 getCellFormatter() 179
Internet Explorer forms, handling events 231 getDescription() 290
implementation 500501 FormSubmitCompleteEvent getElement() 114, 378
other browser 428 getGSearch() 315
implementation 500 Frame 134 getInstance() 382383, 447
other browsers 498 frame.setURL('resource-to- getMetaProperty() 521
FlexCellFormatter 180 load') 134 getName() 290, 427
spanning cells and rows 180 frames, named 429 getprint() 467
INDEX 587
getResult() 428 compilation process, GWT applications
getRowFormatter() 179 output 559 talking between 296298
getStatusCode() 416 compilation, file talking to via JavaScript
getStatusData() 361, 382, mapping 557 API 294296
384, 387 compiler 41 GWT Interfaces
getStatusDataFromServer() components styling 83 HasText 144
380, 385, 397 creating applications GWT Widget Library 147, 340
getType() 479 39, 4463 GWT.create() 71, 80, 366, 368
getValue() 447 creation tools 3942, 46, GWT.create(classLiteral) 474
getWidgetCount() 173 5152, 62, 67 GWT.getModuleBaseURL() 369
getWidgetIndex(Widget) 173 default application 39, 44, GWT.isScript() 369
Google Ajax Search 47, 50, 65, 105 gwt.js 544, 558559
299, 301, 309 development lifecycle. See life- gwt.js JavaScript file 75
API key 299 cycle GWT.log() 101102, 370
GdrawOptions 310 DOM implementation class gwt:module meta-tag 74
GnewsSearch 310 hierarchy 497 gwt:onPropertyErrorFn meta-
GSearchControl 310 event model 196200 tag 75
GsearcherOptions 310 generators 6566, 71, 473 gwt:property meta-tag 75
GwebSearch 310 getModuleBaseURL() GWTDesigner 63
method 553 gwtOnLoad() 572, 578
KeepListener 312
history functions 76 gwt-onLoadErrorFn meta-tag 75
making the widget 314
hosted-browser 41 GWT-RPC 348, 376
SearchControlImpl 311
integration into Eclipse 59 defining 360366
Google Groups 464
internationalization implementing 356370
Google Maps 300 support 502
Google Video Search 300, 336 preparing client side of
introduction 5
GSvideoBar object 303 call 366370
local, altering the
injecting JavaScript RPC concepts 348353
application 518
source 336 servlets 550
modularization 68
JavaScript example 303 gwt-servlet.jar 551
module XML 318
making the widget 306 GWTShellServlet 549
online API reference 118
Google Web Toolkit. See GWT GWTTestCase 22, 537
open source 564
Googlipse 63 properties 495 delayTestFinish()
Grid 35, 138, 181 method 537
properties,
GWT 4 externalvisibility 479 finishTest() method 537
$doc 290, 292 stages of application setModuleName()
$wnd 290, 292, 294 development 42 method 537
application development testing and deploying gwt-user.jar 280
lifecycle 3943 527554
application-loading testing code with JUnit H
mechanism 564572 528539
browser differences 496 user.agent property 495 handleFailure() 389
compilation 556564 user-defined properties 520 handler 35
compilation process using IDEs other than handleSuccess() 389
556, 564, 573 Eclipse 62 HasHorizontalAlignment 256
compilation process, file vs. Echo2 26 required methods 259
mapping 557 vs. JavaServer Faces 27 HashSet 362
compilation process, Java vs. Ruby on Rails 29 HasName 257, 427
objects supported 574 vs. Swing 25 HasText 143144, 255257
compilation process, knowl- widgets default style names 85 required methods 259
edge of browser types 561 565 HasWidgets interface 163
588 INDEX
HasWordWrap 256 HTML widget 132133 Image 127131
required methods 259 HTMLPanel 172 getURL() 150
heap size 97 HTMLTable 170, 178179 PNG problem with Internet
HelpMenuName key 69 setting style of cells 179 Explorer 147
Hidden, hiding data 435436 HTTP image.setVisibility(false) 224
hiding text 433 GET 411413 ImageBundle 129
History 119 GET, compared to images
getTargetHistoryToken() 120 POST 413414 bundling together 128
HistoryListener 119 methods 411414 loading 223224
including in HTML page 120 POST 413414 importing into IDE 5963
onHistoryChange() 119 response codes 416 includes 326
setTargetHistoryToken() 120 HTTP module indent() 484
history importing to module IndexedPanel 173174
history.html 564 configuration 412 inheriting other modules
storage 564 RequestBuilder 414 321325
history files, removing 543 HTTPRequest 111 365
history functions 76 HttpServlet 372 inherits tag 365
History object 21 Husted, Ted 57 init() 196
history tokens 120 Hyperlink 119120, 460 initialization code 578579
history.html 543, 558 getText() 120 Initializing a Composite
History.html file 564 setText() 120 Widget 263
HistoryListener 21, 119 treating as HTML 120 initWidget() 379
HorizontalPanel 170, 177, 253 treating as text 120 injecting a style sheet
hosted development hyperlinks, creating a true resource 336
controller 91 hyperlink 133 injecting JavaScript code 335
hosted mode 333, 369, 573 injection 86
default project URL 365 I innerHTML 149
deployment descriptor 552 428
-gen 90 i18n 45, 5456 installing RPC servlets 548553
-logLevel 89 adding to a structure 55 instantiate() 403405
-noserver 87 module XML file 319 int readInt() 407
-out 90 I18N GWT module 82 IntelliJ 63
setting location for generated i18nCreator 511 intercomponent
code 90 i18nCreator tool 45, 5455, 62 communication 297
setting location of output IDE 59 internationalization 14, 45, 54,
code 90 Eclipse 39, 41, 44, 47, 50, 65, 6872, 97, 328, 495, 560
setting the style of output 53, 55, 5760, 62 change locales 71
code 90 Googlipse 63 constants 504509
-style 90 GWTDesigner 63 ConstantsWithLookup
testing 365366 importing into 5963 504, 509510
testing and debugging in importing to 45 default locale 69
8694 IntelliJ 63 Dictionary 517
-whitelist 87 Matisse 59 dynamic string 516518
hst() 564 NetBeans 59, 63 English 69
HTML 13, 252 other than Eclipse 62 hierarchy 504
getHTML() 120 with GWT wizard 63 implementing 5657
security implications 133 IFRAME 76, 134 ISO country code 502
setHTML() 120 iframes 424 ISO language code 502
HTML panels 178181 ignore flag 53, 59 key/value pairs 69
HTML Table panels 162 IllegalArgumentException 459 Localizable interface 504
INDEX 589
internationalization (continued) Java libraries, adding to loading 299300
Message 504 classpath 90 loading through HTML 299
messages 510512 Java method signature 289 loading through module
messages for default Java Native Interface. See JNI XML 299300
locale 512514 Java objects, passing across third-party, accessing 278
messages for other Java-to-JavaScript wrapping as GWT
locales 514516 boundary 283286 component 300309
messages structure 512 Java package wrapping complex 309315
properties files 69 client 43, 5053, JavaScript Native Interface. See
setting up 5456 55, 5758, 343 JSNI
static string 503516 creating structure 343 JavaScript Object Notation. See
supporting in full 502518 rebind 54, 343 JSON
Swedish 6970 server 41, 43, 54, 343 JavaScript objects, keeping as
use in the Dashboard Java Runtime Environment 10 Java objects 310312
application 124 Java Virtual Machine (JVM) 97 JavaScript resources,
use of generator 472 java.io.File 439 injecting 335336
InterruptedException 400 java.util.Set 450 JavaScriptException 290
introspection 65, 485491 JavaScript 278 JavaScriptObject 284, 287,
in generators 334 $doc 290, 292 302, 304
JClassType 486 $wnd 290, 292294, 304, 311 GSVideoBar example 305
JType 479 access browser JavaServer Faces. See JSF
iSEC Partners 352 functionality 278 JBoss 548
ISO country code 502 call format 575 JClassType.getFields() 486
ISO language code 502 compiling Java to 573579 JClassType.getMethods() 486
IsSerializable 357 document object 290, 292 JNI 281
interface 357358, 361, 402 exposing an API 278, 294 JRE emulation library 10, 358
isString() 460 files, organizing 544 JSF 27
iterator() 170 including in a GWT JSNI 8, 190, 281
application 281283 accessing a field in a Java
J intercomponent object 285286
communication 278, 297 accessing a static field
Jabber 342 libraries 278 285286
Jakarta project 461 loose type model 280 accessing an instance
Java permutations 495, 560561 field 285286
class name 5354 permutations, cache.html 563 calling JavaScript code 282
compiling to JavaScript permutations, Dashboard 579 communicating using
573579 permutations, reducing 290298
creating package number of 561 creating new Java objects in
structure 343 permutations, selecting 561 JavaScript 283
package structure 318 program code as 576578 exceptions 290
packages 343 relocating code 544, 546548 executing methods in Java
strong type model 280 undefined object 287 objects 287290
Vector class 574576 variable 278 introduction 279290
Java 1.4 standard 81 window object 290, 292, 294 JavaScriptObject 284
Java 1.5, use in GWT JavaScript API, talking to GWT passing a byte to
generators 476 application 294296 JavaScript 283
Java 5.0 standard 81 JavaScript libraries passing a char to
Java classpath, confusion with accessing objects 302307 JavaScript 283
GWT modules 322 accessing of 278, 299 passing a double to
Java debuggers 101 calling callback code 312314 JavaScript 283
590 INDEX
JSNI (continued) using with Ruby 467469 L
passing a float to value types 469
JavaScript 283 json library for Ruby 467 Label 131132, 248, 252
passing a JavaScriptObject JSON.parse() 468 adding a ClickListener 262
to JavaScript 284 JSONArray 458 adding to component
passing a long to storing JSONValue 380382
JavaScript 283 objects 448449 create as plain text 131
passing a short to JSONBoolean 447 editing by clicking 250
JavaScript 283 JSONException 459 getText() 132
passing a String to JSONNull 447448 setHorizontalAlignment()
JavaScript 284 JSONNumber 446 131
passing a user-defined Java JSONObject 456, 459 setText() 132
object to JavaScript 284 collecting JSONValue setWordWrap() 131
passing an array to objects 449450 Label object 78
JavaScript 284 JSONParser 443, 445 Label widget 80
passing an int to parse() method 459 legacy applications 565
JavaScript 283 JSONString 446 libwww-perl 465
passing Java objects to JSONTokenizer 464 lifecycle 3944, 67, 94, 103
JavaScript 283 jsonToObj() 466 stage 1, tools 45, 65
returning a Java object 286 JSONValue 445446, 458, 460 stage 2, development 6786
returning a JSONValue objects stage 3, testing and
JavaScriptObject 287 collecing in JSONObject debugging 8694
returning a String 286 449450 stage 4, compiling 9498, 556
returning null objects 287 storing in JSONArray stage 5, deployment 9899
returning primitive types 286 448449 stage 6, running in web
syntax 281 JUnit 22, 45, 54, 57, 59 mode 99
downloading 529 stages 41
JSON 111, 469
LinkCommand 419
arrays 444 JAR file 57
loading web page 420421
basic types 446447 overview for GWT
List interface 362
classes, adding to configura- developers 529534
list, displaying in a ListBox
tion file 453 testing GWT code 528539
434435
creating Search version compatibility with
ListBox 135137, 434435
component 450460 GWT 529
drop-down view 136
data format 443444 JUnit in Action 57
getItemText() 136
data objects 445450 junitCreator
getSelectedIndex() 136
deserializing data 445 command-line options 534 getSelectedItem() 137
format 443 creating TestCase 534 setMultipleSelect() 137
implementations 462 running 534535 setSelectedIndex() 137
introduction 443445 junitCreator tool 45, 5758, 62 setting height 136
module 453 -junitflag 58 standard view 136
number 444 listener.onBrowserEvent() 208
Perl module 465 K listeners
response 458 ChangeListener 218221
sending data to server keyboard events ClickListener 212, 252
455457 eventGetKeyCode() 209 FocusListener 215
server proxy 462 getting key pressed 209 KeyboardListener 140
server response 457460 keyboard, capturing inputs 223 LoadListener 223
using with Java on server KeyboardListener 140, 168, 223 MouseListener 211
461465 KeyboardListenerAdapter 223 PopupListener 232
using with Perl 465467 keySet() 450 ScrollListeners 224226
INDEX 591
listeners (continued) menu system 65 defining server resource 327
TableListener 234 MenuBar 80, 121124 extending properties 329
TreeListener 235 addItem() 122 filtering public resources 326
Window CloseListener 293 onPopupClosed() 124 GWT Widget Library 322
WindowCloseListener widget 80 HTTPRequest 322
227231 MenuItem 121124, 150155 include other modules
WindowResizeListener extending 146 321325
226227 getCommand() 123 injecting a style sheet 336
loading error function, getParentMenu() 122 injecting JavaScript code 335
registering 571 getSubMenu() 122 internationalization 322
LoadListener 127, 223 setCommand() 123 JSON 322
onError() 223 setSubMenu() 122 packaging 341343
loadSubMenu() 419, 423424 treating as HTML 123 path to public resources 325
locale 502 MenuLoaderHandler property provider 330
changing 91 419, 421423 registering Generator
changing in HTML 506 menus, enabling/disabling auto- class 333334
changing through URL 506 opening of children 123 replace class due to
hierarchy 502 menuTitle 423 properties 333
permutations based on 560 Messages 14 setting source code path
locale-specific classes 519520 metaProps 569 325326
Localizable interface 504 metatags 74, 545 setting the entry point 337
localization 15 gwt:module 568 standard with GWT 319
Log4J 89, 103 gwt:onLoadErrorFn 569, 571 third-party, using 339341
Log4JavaScript 103 gwt:onPropertyErrorFn 569 User 322
Log4Perl 103 gwt:property 568569 XML 322
Log4PHP 103 processing 568 XML processing 322
logging 100103, 386 property, managing 569 Mouse events 207
automatic 391 methods eventGetButton() 207
handler 389 making final 391 mouse inputs 224
in a generator 480482 overwriting existing 484485 MouseListener 211
on the client side 100103 using introspection 485491 onMouseDown() 211, 237
on the server side 103 Model View Controller. See MVC onMouseMove() 237
logging levels 89 modularization 68, 319321 onMouseUp() 237
LoggingAsyncHandler 391 creating 318339 multipart messages 436
Login 140 module configuration 550 MVC 26
logLevel argument 89, 95 importing HTTP module 412 myAppConstants.properties 504
logs directory 550 module flag 59 MyAsyncHandler 389390
long readLong() 407 module XML 81, 561 MyLoggingHandler 390
LWP 465 property replacement
LWP::Simple 467 501502 N
registering a generator 474
M replace tags 497 named DOM elements 74
user defined property benefits 77
Massol, Vincent 57 provider 521 NamedFrame 134, 429, 431
Matisse 59 module.nocache.js file 559561 naming convention for widget
Maven 99 module.nocache-xs.js file styles 268
maxLength vs. TextBox width 559, 561 native keyword 282
property 432 modules native, declaring method 9
maxResults 456 class replacement due to .NET 410
maybeStartModule() 572 properties 332333 Net::Http::get_response() 469
MD5 name, determining 571 defining properties 328 NetBeans 59, 63
592 INDEX
nocache-xs.js 558 -out flag 56, 59 insert() 161, 170
nontransient fields 358 outdent() 484 onAttach() 163
noserver argument 87 -overwrite flag 53, 59 PopupPanel 164165, 270
null pointer errors 94 overwriting existing RootPanel 158, 161, 171
NullPointerException 459 methods 484485 ScrollPanel 164, 168170
setting styling 159
O P simple panel, definition 162
SimplePanel 164170
OBFUSCATED option 90 Package Explorer 60 StackPanel 174175
Object readObject() 407 package names, restrictions 364 standard GWT 162182
OBJECT tag 498 package structure, creating 343 TabBar 181
objects, sending across pageYOffset 293 TabPanel 173, 181182
JavaScript-to-Java boundary Panel class 162 VerticalPanel 160161,
286287 Panel, Grid 138 170, 177178, 253
onBefore 232 panels 12, 158 _parent frame name 430
onBrowserEvent() AbsolutePanel 171 parentMenu 423
117, 145146, 162, 203208 add() 161, 170 parkComponent 190
handling sunk events 203 adding widgets 159 parse 445
overriding 203 adopt() 184 password entry, securing 140
onClick() 78 alignment 161 PasswordTextBox 140, 433
onCompletion() 539 as DOM elements 160162 Perl 443
onError() 370 as Java objects 159160 using with JSON 465467
onEventPreview() 190 CellPanel 176 permutations 94
onFailure() 370, 387 ComplexPanel 162, 170178 reducing number of for
onKeep() 312 composite panel 162 testing 562
onKeyPress() 141 creating 182187 PHP 410
onLostFocus() 240 creating by extending an exist-
Pjax 393
onModuleLoad() ing panel 186187
PNGImage 147148
78, 80, 123, 227 creating for Dashboard
onBrowserEvent() 150
onMouseDown() 207, 239 187190
onMouseDown(Widget sender, creating from scratch sinkEvents() 150
int x, int y) 237 183185 PNGImageImpl 149
onMouseEnter(Widget DeckPanel 170, 173174 PNGImageImplIE6 149
sender) 237 DialogBox 164166 polling 392
onMouseLeave(Widget difference from widgets 163 comparison to blocking server
sender) 237 disown() 184 threads 398
onMouseMove() 240 DockPanel 175177 issues 392393
onMouseMove(Widget sender, extending, vs. composite techniques 392401
int x, int y) 237 widgets 182 PopupListener 124, 232
onMouseUp(Widget sender, FlexTable 179180 onPopupClosed() 232
int x, int y) 237 FlowPanel 160, 173, 253 PopupPanel 164165,
onResponseReceived() 422, 538 FocusPanel 164, 167168 208, 231, 270
onSelected() 232 FormPanel 164, 166167 pop-ups, reacting to
onSink() 202 getChildren() 170 closing 231232
onSuccess() 370, 387 Grid 181 POST 413414, 456
onWindowClosed() 228 HorizontalPanel prefetch() 128
onWindowCloseListener() 293 170, 177, 253 PRETTY option 90
org.gwtbook 364 HTML table panel 162 PrintWriter 483
organization 540 HTMLPanel 172 process() 400
organizing projects 540548 HTMLTable 178179 production environment,
out argument 90, 96 IndexedPanel 174 configuring 550552
INDEX 593
program code, as public attribute 51 RequestBuilder.GET 414
JavaScript 576578 public folder 364 RequestBuilder.POST 414
project public tag 326 RequestCallback 416, 538
creating 4750 Pushlet 393 onError() method 416
importing into Eclipse 6061 onResponseReceived()
organizing 540548 R method 416
project files, separating from RequestException 415
other pages 544 radio buttons 434 request-response cycle 411, 464
projectCreator 44, 4748, RadioButton 138139, 434 resources, injecting at
50, 91, 353 grouping together 139 runtime 334337
projectCreator tool 47 reader methods 406 Response
properties 495 rebind 476 checking status codes 416
defining 328330 rebind decision files, getHeader() 417
defining initial value 496 removing 541542 getHeaders() 417
defining new 328 reducing complexity 382 getHeadersAsString() 417
definition in module reflection 361 getStatusText() 417
XML 495496 refresh rate 393 ResponseCallback 456
determining value through registering Generator class Result property 453
code 496 333334 ResultSet 452
extending 328330 releaseCapture() 237, 239 right mouse clicks,
extending in module remote calls, capturing 206
XML 495 encapsulating 382384 ROOT directory 551
managing 327332 Remote Procedure Call. See RPC RootPanel 35, 80, 158,
managing differences remote server 161, 171, 379
330332 calling 368370 RootPanel.get() method 80
user defined 520523 restrictions for communicat- RootPanel.get().add(widget/
user specified 521 ing with 351353 panel) 199
properties file 14 remote service call RPC 16, 94, 111, 326, 348
encoding 70 making 370 installing servlets 548553
format 69 RemoteService interface logging 391
hierarchy 70 361, 364, 368 underlying concepts 348356
key/value separator 69 extending 361362 with RequestBuilder 414417
UTF-8 69 RemoteServiceServlet Ruby 443
property error function 363, 372, 553 using with JSON 467469
registering 569571 removeChangeListener 259 Ruby on Rails 29
property provider 330 removeMenu() 275 RubyForge 467
establishing 567568 removing history files 543 RubyGems 467
tag 496 541 running tests 531532
user-specified 521522 replacing class due to property runtime errors 532
property replacement 501502 values 332333 RuntimeException 150, 262
PropertyOracle 479480 Request
getPropertyValue() 480 cancel() method 415 S
providing code to determine checking status 415
properties 330 isPending() method 415 Scalar Vector Graphics 13
proxy 351, 461 setting properties 414 schedulable class 395398
proxy classes 361 request.getParameter() 415 schedule() 395
proxy object 366, 384 RequestBuilder 423, 439, 455 scheduleRepeating() 395
casting to loading XML data 417424 scheduling tasks 392401
ServiceDefTarget 368369 RPC 414417 script.aculo.us 252
creating 368 sendRequest() method 415 Scriptaculous 341
proxy service 461 with Ajax 410424 use in the Dashboard 341
594 INDEX
scrolling 168 ServerService 363, 382383 setSecondComponent() 153
ScrollListeners 224226 server-side 46, 23 setServiceEntryPoint() 367368
ScrollPanel 164, 168170 classes 372 setStyleName() 268
ensureVisible() 169 code 364 setText() 166, 377
setAlwaysShowScrollBars() GWT-RPC 99, 360 setTextLabel() 262
169 Java compliance 81, 415 setting application's entry
setHorizontalPosition() 169 JSON 450 point 337
setScrollPosition() 169 logging information 103 setting path to public
search component, creating with service implementation resources 325
JSON 450460 363364, 371 setting source code path
SearchResultsHandler 456 successful response 416 325326
searchString 456 testing functions 537539 setUrl() 128
security 351 throw exception 370 setVerticalAlignment() 161
_self 420, 429 ServerStatsUpdater 385, 390 setVisibleItemCount(number)
sendRequest() 424 ServerStatus 131, 232 136
serializable data objects 371 ServerStatusComponent, setWidget() 166, 190
following rules for client-side creating 378 short readShort() 407
code 358 ServerStatusService_Proxy 366 simple panels, defined 162
SerializableException 363 ServerStatusServiceAsync 367 SimplePanel 164170, 427
serialization 348, 402, 405 service implementation add() 153
custom, implementing 363365, 371 insert() 153
404407 service proxy 366, 372 Singleton pattern 382
types supported by GWT 357 ServiceDefTarget 367369 sinkEvent() 202
SerializationException 404406 services sinkEvents() 145, 147
SerializationStreamReader calling from client 372374 sinking events 197, 200203
404406 server-side sleep command 399
SerializationStreamWriter 405 implementation 371372 Slider
serialize() 403, 405406 365, 550 creating 270273
serializers servlet configuration 549550 GridSlider 273
class 403404 servlet containers 548549, 552 HorizontalSlider 273
custom 402407 Apache Tomcat 548 onMouseDrag() 271
custom, class rules 403 servlet path setting 365 VerticalSlider 273
custom, reasons to write 402 servlet tag 365 slider index 272
server ServletFileUpload 438 Slideshow 119, 128
contacting 348 ServletFileUpload.isMultipart- software patterns 376
implementing blocking Content 438 source attribute 51
399401 553 SourceKeyboardEvents 252
server package 365 servlets 326, 463 SourcesChangeEvents
server proxy 462 configuration file 549 220, 256, 272
server resources, defining for an mapping to URL 553 SourcesClickEvents 212213,
application 326327 RPC, installing 548553 252, 256
Server Status 234, 348, 552 Set 362 checking for instanceof 262
creating 353356 setAutoOpen() 123 required methods 259
encapsulating 376382 setCancelled() 428 SourcesEvents 214
encapsulation 376 setCapture() 237 SourcesMouseEvents 211, 256
updating 393 setElement() 114 required methods 259
server threads setHorizontalAlignment() 161 SourceWriter 478, 482
blocking 398401 setHTML() 166 sprintf() 466
server-push 351, 392393 setName() 427 StackPanel() 174175
emulating 398401 setOnKeepCallback() 313 getSelectedIndex() 175
unavailable to browsers 398 setPopupPosition() 238 setStackText() 175
INDEX 595
stale connections 401 assertFalse() 530 setCursorPos() 139
standard applications 566567 assertNotNull() 530 setText() 139
bootstrapping 567572 assertNull() 530 theLabel.setWidth() 131
startUpdateTimer() 396397 assertSame() 530 third-party libraries 13
static-string available assertions 530 altering module XML file 341
internationalization creating new 534537 changing necessary
503516 fail() 530 classpaths 340
status codes, checking 416 failSame() 531 JavaScript, accessing 278
stdin 468 setUp() 533 using 339341
stopUpdateTimer() 397 tearDown() 533 Thread.sleep() 400
String readString() 407 writing 529531 timed events 394
stringValue() 446, 460 test-driven development 528