[Json-rpc-java] json-rpc-java bugs or lack?
William Becker
wbecker at gmail.com
Thu Jan 31 08:57:05 SGT 2008
Hi,
to use a list from jabsorb, you have to access the list variable.
> var oList = json.JsonRpcCall.test("{id:997,sldfk}"); // is list
> oList.size(); // is error, it's no List methods
>
This is expected behaviour. Jabsorb does not send the data directly in the
return value so that meta data (eg the class name) can also be sent. To
access it do:
oList.list.size();
(assuming that size() is a function on your list - unless you are running
prototype.js it probably isn't and you may need to use oList.list.lengthinstead.
> oList.lst.addAll(index, c); // is error, it's no List methods
>
This will not work even if you correct it to oList.list.addAll(index, c);
as the functions have not been exported as you have not set it as a callable
proxy (Callable proxies allow you to make remote calls on an object).
Are you trying to add the data to the remote list or to the local list? If
the later, just use standard javascript functionality.
Cheers,
Will
More information about the Json-rpc-java
mailing list