On 2012/08/28 13:17:58, jtamplin wrote:
LGTM, as far as it goes

However, when you use GWT.create in non-client code, there is some
setup you
need to do - you have to create the ServerGwtBridge, set the deferred
binding
properties (either globally or per-thread), and you need to register
any
ClassInstantiators you need for the various GWT.create calls.  Look at
ServerGwtBridgeTest for some examples.

I haven't looked at the usages in these files, but basically the only
things
GWT.create knows how to do out of the box right now on the server is
to find the
local-specific classes for subtypes of Localizable and to do new
FooImpl() or
new Foo() for GWT.create(Foo.class).

Most likely, you will also need to create and register additional
class
instantiators for the GWT.create usages here, and then document what
additional
properties need to be setup for server-side usage.

This is only about fixing NoClassDefFoundErrors on server-side, as
c.g.g.client.GWT is not included in gwt-servlet.jar.

In most cases, it's only used for GWT.isClient() or GWT.isScript() to
switch strategy depending on whether it's in a VM and/or DevMode, or
compiled to JS. Most uses of GWT.create are conditionned by such tests,
so won't be an issue. There are a couple uses of GWT.create without
those checks though, but they're only there for convenience and wouldn't
work outside DevMode anyway:
 - PlaceController's Delegate to default to DefaultDelegate, which
relies on c.g.g.u.c.Window.prompt()
 - PlaceHistoryHandler's Historian to default to DefaultHistorian, which
relies on c.g.g.u.c.History


https://gwt-code-reviews.appspot.com/1818803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to