Does gwtai support only parameters with primitive types?

26 views
Skip to first unread message

Masimo

unread,
Jan 8, 2011, 5:41:20 PM1/8/11
to gwtai
Dear all,

If I try to pass non primitive parameters from gwt to the applet, I
get an error message like:

com.google.gwt.core.client.JavaScriptException: (String):
java.lang.IllegalArgumentException: No method found matching name
showCoursePlan and arguments
[sun.plugin2.main.client.MessagePassingJSObject,
sun.plugin2.main.client.MessagePassingJSObject]

at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
195)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:
284)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:
107)
at
appletInterface.CoursePlanAppletInterfaceImpl.showCoursePlan(CoursePlanAppletInterfaceImpl.java)

This is the method declaration I used:

public void showCoursePlan (CoursePlan coursePlan,
List<DistributedClass> distributedClasses);

If I use only primitive parameters (e.g. public void
showCoursePlan(String name); ), it seems to work.
Does gwtai support only parameters with primitive types or did I do
something wrong?
Any help is appreciated very much!

Kind regards,
Martin

Masimo

unread,
Jan 9, 2011, 8:40:34 AM1/9/11
to gwtai

This topic was already discussed in detail in "Passing Complex
Objects" by Phaedrus!!!

I will try the library Phaedrus suggested (http://code.google.com/p/
google-gson/ )

Kind regrads,
Martin
Reply all
Reply to author
Forward
0 new messages