I would say: pass the data as an array, and wrap the RPC service on the client
side:
public void doSomething(Object param1, AsyncCallback callback, String...
strings) {
asyncClient.doSomething(param1, strings, callback);
}
If you really need varargs. Bare in mind the expense of varargs in JavaScript
is fairly high (since
it's turned into an Array underneath by the GWT compiler)... A better option is
to just go with the
old 1.4 syntax:
doSomething(param1, new String[] { "String 1", "String 2" });
although it's the same expense as varargs, it plays nicely with RPC.
Litty Preeth wrote:
> Hi all,
>
> Anybody have any idea how to use variable length argument (like
> String...) in an RPC service. Coz the corresponding async service
> should have AsyncCallback as its last argument. But when we use
> variable type argument that should be the last argument of the method.
>
> Thanks,
> Litty Preeth
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---