diff options
Diffstat (limited to 'client-compiler')
-rw-r--r-- | client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java | 7 | ||||
-rw-r--r-- | client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java index 4ab5cccb2e..7b326c65fc 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java @@ -73,14 +73,17 @@ public class ArraySerializer extends JsonSerializer { @Override protected void printSerializerBody(TreeLogger logger, SourceWriter w, String value, String applicationConnection) { + JType componentType = arrayType.getComponentType(); + w.println(JSONArray.class.getName() + " values = new " + JSONArray.class.getName() + "();"); // JPrimitiveType primitive = componentType.isPrimitive(); w.println("for (int i = 0; i < " + value + ".length; i++) {"); w.indent(); w.print("values.set(i, "); - w.print(JsonEncoder.class.getName() + ".encode(" + value - + "[i], false, " + applicationConnection + ")"); + w.print(JsonEncoder.class.getName() + ".encode(" + value + "[i],"); + ConnectorBundleLoaderFactory.writeTypeCreator(w, componentType); + w.print(", " + applicationConnection + ")"); w.println(");"); w.outdent(); w.println("}"); diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java index fa0a8390a4..e14e8234d5 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java @@ -38,6 +38,7 @@ public class ServerRpcVisitor extends TypeVisitor { for (JMethod method : methods) { ClientRpcVisitor.checkReturnType(logger, method); bundle.setNeedsDelayedInfo(type, method); + bundle.setNeedsParamTypes(subType, method); JType[] parameterTypes = method.getParameterTypes(); for (JType paramType : parameterTypes) { |