keyPressEvent.getCharCode() returning 0 for all special keys like enter, tab, escape, etc

the KeyPressHandler is used for example for the SHIFT, CTRL, ALT keys. If you want to attach an event to another key you have to use KeyDownHandler. nameField.addKeyDownHandler(new KeyDownHandler() { @Override public void onKeyDown(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { Window.alert(“hello”); } } });

GWT RPC data format

EDIT: Brian Slesinsky just documented the protocol (by reverse-engineering the code): https://docs.google.com/document/d/1eG0YocsYYbNAtivkLtcaiEE5IOF5u4LUol8-LL0TIKU/edit First, GWT-RPC protocol is asymmetric so that it’s always optimized for the client-side: fast to deserialize something coming from the server, and fast to serialize something to send to it. It’s obviously not binary, as you suspected, but text-based. client-to-server protocol is pipe-delimited … Read more

GWT Compiler can’t find gwt.xml

I spent an hour staring at my gwt.xml file trying to figure out what I had done wrong after restructuring a project. Turned out it was in a sub-package of client instead of client itself. Right at the bottom of a long list of packages and sub-packages too. So in Eclipse’s tree view, it looked … Read more

GWT vs Dart – what are the main differences? Is Dart a potential replacement of GWT? [closed]

I think I found it: (should have read Dart’s FAQ first, instead of googling “GWT vs Dart”) From: http://www.dartlang.org/support/faq.html#future-for-GWT Q. What’s the future for GWT? Bruce Johnson posted on the GWT blog (with further comments on Plus): “Dart and GWT both share the goal of enabling structured web programming. In fact, many of the same … Read more

Threading in GWT (Client)

JavaScript doesn’t support multithreading. However, GWT has a class to ‘simulate’ threading, which is not real multithreading, but in most cases does what you need: com.google.gwt.core.client.Scheduler.ScheduledCommand. The technique is based on the timer class, which executes a method after the given time elapses. For example, when placing the following code in you own code, the … Read more

Java 8 support in GWT

EDIT GWT 2.8.0 was released on Oct 20, 2016 with support for Java 8 language constructs (lambdas, method references) and emulation of some Java 8 APIs (streams mostly) EDIT as of Apr 2014, GWT 2.6 supports Java 7, and work is underway to support Java 8 in GWT 2.7, to be released by the summer … Read more

Differences between GWT and Vaadin

In GWT application logic is normally run on client side. It only calls server when it needs to read/save some data. In Vaadin application logic is on server side. Client side must normally call server after every user interaction. GWT advantage: App logic (replies to user interaction) is faster as it is run locally in … Read more

Why use GWT.create() instead of new?

GWT.create is used by the GWT compiler for deferred binding. Deferred binding is a feature of the GWT compiler that works by generating many versions of code at compile time, only one of which needs to be loaded by a particular client during bootstrapping at runtime. You should only use the GWT.create for those cases … Read more