• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
© 2009 Marty Hall
The Goole Web Toolkit GWT:Widget Event Handling
(GWT 1.6 Version)
 
Originals of Slides and Source Code for Examples:http://courses.coreservlets.com/Course-Materials/ajax.html
Customized Java EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces/Facelets, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
© 2009 Marty Hall
For live Ajax & GWT training, see trainingcourses a p:courses.coreserves.com.
Taught by the author of 
Core Servlets and JSP 
,
More 
, .venues, or customized versions can be held on-siteat yourorganization.
 
Customized Java EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces/Facelets, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
 
Courses developed and taught by Marty Hall
 – Java 5, Java 6, intermediate/beginning servlets/JSP, advanced servlets/JSP, Struts, JSF, Ajax, GWT, custom mix of topics
Courses developed and taught by coreservlets.com experts (edited by Marty)
 – Spring, Hibernate, EJB3, Ruby/Rails
Contacthallcoreservlets.comfordetails
 
Topics in This Section
Main approaches to event handling
Separate handler classesMain class implementing handler interface Anonymous inner classes
 
Pushbuttons and related widgetsCheckboxes and related widgetsListboxesand related widgetsTextfields and related widgets
5
© 2009 Marty Hall
Idea
Customized Java EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces/Facelets, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
 
General Approach
Make a control
TextBoxtextfield = new TextBox();
Attach an event handler
textfield.addKeyUpHandler(new MyKeyUpHandler());
 
MyKeyUpHandleris class that implements KeyUpHandler
textfield.addKeyUpHandler(this);
Current class this imlements KeUHandler
textfield.addKeyUpHandler(new MyKeyUpHandler());
MyKeyUpHandleris inner class that implements KeyUpHandler
. ...
Note
This is
exactly
the same approach as with Swing, AWT, or SWT
ou wre even aners usng e same sraeges as ndesktop Java programming, even though code gets compiled toJavaScript and HTML at runtime
7
© 2009 Marty Hall
 Classes
Customized Java EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces/Facelets, Ajax, GWT, Spring, Hibernate/JPA, Java 5 & 6.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...