|
Are you using Object.registerClass() to register the
UserVO type to map the fully qualified ActionScript class name to that returned
by Java (rather than the old Flex 1.0 _remoteClass which I strongly discourage
in Flex 1.5)?
If so, then the next step is verify that the server
sent back Typed AMF Objects in the RemoteObject response rather than generic AMF
Objects.
To do so, you want to rely on server side logging for
this as it is more reliable and client AMF debugging tools (notably it avoids
the issue in the old Flash Remoting NetConnection Debugger where by registered
objects are printed as "undefined" in the trace output - possibly related to a
bug in AS2 that registered type instances answer true to a test for "==
null"... the work around to this bug in your own code is to use the
strict equality test of "=== null" or "!== null")
If you're working on a local Flex server and launched
your app server on the command line - enable console logging in
/WEB-INF/flex/flex-config.xml and then modify the AMF Gateway logging settings
by turning on "Debug" level logging in the /WEB-INF/flex/gateway-config.xml
file.
You should see in AMF trace whether Typed objects were sent
(and the classname that was specified for the type).
From: Jeff Krueger [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 11:47 AM To: [email protected] Subject: [flexcoders] Remote object that returns an array of objects All,
I have a method on my app server called getAllUser() that returns UserVO[].
When I get that back in flex as an Array the items inside the array are of
type object, instead of the actionScript UserVO that is associated with that
java type being returned. My work around for this is to create a
UserArrayVO class on both sides (App Server and Flex) and in that class is just
one variable that is of type UserVO[] on the server and Array on flex and then I
get back the correct classes in flex. So my question is, is this the way
to do something like this? Obviously flex knows how to handle the objects
when it is within another class, just not when it is an array of them coming
back. Thanks Jeff Yahoo! Groups Links
|
- RE: [flexcoders] Remote object that returns an array of obje... Peter Farland
- RE: [flexcoders] Remote object that returns an array of... Simon Fifield
- RE: [flexcoders] Remote object that returns an array of... Peter Farland
- RE: [flexcoders] Remote object that returns an array of... Jeff Krueger
- RE: [flexcoders] Remote object that returns an array of... Peter Farland
- RE: [flexcoders] Remote object that returns an array of... Simon Fifield
- RE: [flexcoders] Remote object that returns an array of... Jeff Krueger
- RE: [flexcoders] Remote object that returns an array of... Peter Farland
- RE: [flexcoders] Remote object that returns an array of... Jeff Krueger
- RE: [flexcoders] Remote object that returns an array of... Peter Farland

