logo       

RE: Bug in 2.0 RC2 wrt List<ComplexType>: msg#00130

java.dwr.user

Subject: RE: Bug in 2.0 RC2 wrt List<ComplexType>

Patrick,
 
You should look in the documentation about signatures, you will need to add one so DWR knows what object you're trying to convert.
 
Randy


From: Patrick Lightbody [mailto:plightbo-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx]
Sent: Thu 2/15/2007 3:37 PM
To: users-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx
Subject: [dwr-user] Bug in 2.0 RC2 wrt List<ComplexType>

I'm finding that I can't get Lists of complex objects to properly 
convert as I'd expect (List<String> works fine and is my current work-
around). I swear this worked in 2.0 M2, but perhaps it never worked. 
Please let me know if I'm doing something wrong or if there is a 
solution:

     @RemoteMethod
     public long runTest(final String url, List<BrowserSetting> 
settings) {
         ....
     }

My args sent in from the JS side are:

["http://www.hostedqa.com", [{operatingSystem: 1, browser: 2, 
screenSize: 3}]]

The error I get is when the second param is attempted to be 
converted. I traced through DWR's internals and I see that it finds a 
converter for BrowserSetting (BeanConverter). It then calls 
convertInbound() on BeanConverter, which goes in to 
BasicObjectConverter.convertInbound(), and immediately fails because 
the input param is not of the proper type.

Specifically, the input param is of type Array and has a value of 
"[...references...]", which is what an array should look like. 
Nowhere does CollectionConverter ever get called, and I can't figure 
out why. Clearly the second param is being identified as a type 
"Array", so I'm not sure what is going on.

Any help is appreciated.

Patrick



Patrick Lightbody
Autoriginate, Inc.
503-488-5402
http://www.autoriginate.com
patrick-CKbW2bJMD/JrfPsKA4R/ew@xxxxxxxxxxxxxxxx

"Intelligent testing made convenient"





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise