Look at http://osdir.com/ml/GoogleWebToolkitContributors/2010-02/msg00466.html
On 19 Kwi, 23:59, Raziel <[email protected]> wrote: > Does anybody have an example of implementing AsyncProxy to dynamically > load a class via the underlying runAsync? > > Basically I use the snippet of code in the AsyncProxy javadoc, but at > compilation time I get the following error: > > interface IFoo { > void doSomething(int a, int b); > void anotherMethod(Object o); > } > class FooImpl implements IFoo { > @Override > public void anotherMethod(Object o) { > } > @Override > public void doSomething(int a, int b) { > } > } > > @ConcreteType(FooImpl.class) > interface FooProxy extends AsyncProxy<IFoo>, IFoo {} > > class UserOfIFoo { > private IFoo foo = GWT.create(FooProxy.class); > > void makeTrouble() { > // This first call triggers a runAsync load > foo.doSomething(1, 2); > > // and this second will replayed after the call to doSomething() > foo.anotherMethod("A string"); > } > } > > [java] Computing all possible rebind results for > 'com.mypackage.client.util.FooProxy' > [java] Rebinding com.mypackage.client.util.FooProxy > [java] Invoking > com.google.gwt.dev.javac.StandardGeneratorConte > x...@162144c > [java] [ERROR] Expecting concrete > typecom.mypackage.client.util.FooImpl to be static. > [java] [ERROR] Errors in 'file:/C:/work/gwt/GWTProject/src/com/ > mypackage/client/util/FooProxy.java' > > [java] [ERROR] Line 72: Failed to resolve > 'com.mypackage.client.util.FooProxy' via deferred binding > [java] [ERROR] Cannot proceed due to previous errors > > What does it mean "FooImpl to be static"? I mean, this is the example > in the javadoc! I don;t see any special instructions for using > AsyncProxy. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
