Description:
When more than one RequestFactory is created, we are getting compiling
errors because some of the records are not in the same package than the
actual request factory. To fix this, we simply add all the imports to
the RequestFactoryGenerator in order to know where to find these
records.
Please review this at http://gwt-code-reviews.appspot.com/653802/show
Affected files:
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
Index:
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
===================================================================
---
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
(revision 8401)
+++
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
(working copy)
@@ -315,6 +315,12 @@
f.addImport(interfaceType.getQualifiedSourceName());
f.addImport(Record.class.getName());
f.addImport(RecordSchema.class.getName());
+
+ for (JClassType publicRecordType : generatedRecordTypes) {
+ f.addImport(publicRecordType.getPackage().getName() + "." +
publicRecordType.getName());
+ f.addImport(publicRecordType.getPackage().getName() + "." +
publicRecordType.getName() + "Impl");
+ }
+
f.addImplementedInterface(interfaceType.getName());
f.addImplementedInterface(interfaceType.getName());
Great.. are we going to be able to extend a RequestFactory with this
patch? I described the issue there:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5134
We also have the same issues with the Record. We have one common Record
for basic functions that we inherit from others. The problem here is
that the Impl won't implement getters for the inherited types.
http://code.google.com/p/google-web-toolkit/issues/detail?id=5136
We can always work around this by using get(obj.property) instead of the
getters, but EditorSupport really try to use the getters to set the
values in the UI.
done..