[Json-rpc-java] Accessing returned objects.

tom.simmons at vetco.com tom.simmons at vetco.com
Mon Sep 3 22:00:51 SGT 2007


I have successfully set up JSON-RPC-Java, and from my servlet create an 
instance, register an object with it, then from the javascript in a JSP 
page access the object.

The problem I have is, the object(a) I registered has a method that 
returns another object (b), using the line...

jsonrpc.hCalendar.getCalendarDay(new Date(year, month, day)).day

I can get a value of day from object b using the day method (getDay) in 
object b.

However I can't do the following.....

jsonrpc.hCalendar.getCalendarDay(new Date(year, month, 
day)).justDoIt(entryType, meridiem);

justDoIt is another method in object b, but I get a javascript error 
of....

Object doesn't support this property or method.

In the debug output from GlassFish I can see the following 2 lines, the 
first is object a, the second object b...

analyzing vg.holiday.ee.calendar.HolidayCalendar
analyzing vg.holiday.ee.calendar.CalendarDay

Why can't I use justDoIt and how should I be doing this?


Tom



Tom Simmons
Vetco Gray
a GE Oil  & Gas business
Systems Analyst
 
T +44 1224 852000
D +44 1224 356347 
F +44 1224 356310
M +44 7852 000233
E tom.simmons at vetco.com
www.geoilandgas.com/vetcogray 
 
Silverburn House,
Claymore Drive, Aberdeen
AB23 8GD
Vetco Gray UK Ltd
 
 
 
 

 
 


More information about the Json-rpc-java mailing list