I defined it on the client side as just a List<Sensor> ... maybe that's the 
problem?  I'll try it.


On Monday, May 7, 2012 8:52:10 PM UTC-4, Paul Stockley wrote:
>
> What kind of type is List? Typically JSO's only support JsArray<> for 
> arrays of JSO's
>
> On Monday, May 7, 2012 2:51:13 PM UTC-4, Christopher Piggott wrote:
>>
>> Hi,
>>
>> What's the current state of javascript overlay objects and 
>> JsonpRequestBuilder?  Should the same code work both in deployed (running 
>> on a web server) as well as  debug / development mode?
>>
>> I'm running into issues with runtime exceptions, and the whole thing is a 
>> bit murky to me.  The jsonp "object" that I'm returning is actually nested:
>>
>> public class SensorList extends JavaScriptObject {
>>     protected SensorList() { }
>>     public final native List<Sensor> getSensorList() /*-{ return 
>> this.sensorList; } -*/
>> }
>>
>> public class Sensor extends JavaScriptObject {
>>     protected Sensor() { }
>>     public final native List<Sensor> getSensorName() /*-{ return 
>> this.sensorName; } -*/
>>     /* other properties ... */
>> }
>>
>> I just can't seem to make this work with:
>>
>> builder.requestObject(url,
>> new AsyncCallback<SensorList>() {
>>                                     public void onSuccess(SensorList 
>> sList) { ... }
>> }
>>
>> I either get the no such method <init> problem or if I try to fix that by 
>> adding interfaces I get class cast exceptions.
>>
>> Very confusing.
>>
>> --Chris
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/eS-uE0QFfh0J.
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.

Reply via email to