You will get results, but instead of proper classes inside it, you will have Objects.
There are some topics on the internet about this (How do I get a strongly typed collection from BlazeDS?)... People are trying to find out why class has not been deserialized properly, and as a result, they suggest solutions\workarounds like new instance that never will be used (http://stackoverflow.com/questions/1756755/how-do-i-get-a-strongly-typed-collection-from-blazeds#comment2245464_1764544):
var dummyClass:MyVOClass = new MyVOClass();
Is it right?... don't think so.
Why are you trying to send any data that will never be used on Client? If it is used, why don't you use VOs for it? Why do you address that data as Object?
Those are the questions that should help to figure out what is wrong with design.. of course it is not a complete list.
But.. enough of that. Here is some notes that can be helpful:
0) Do not send unnecessary data to Client application;
1) If you have VOs declared, use them instead of just working with the Objects;
2) Use "-keep-generated-actionscript=true" compiler argument and try to look into generated code. If Flex aware of your VO (RemoteObject), you will be able to find something like this:
// com.localnamespace.vo.EMail
try
{
if (flash.net.getClassByAlias("Remote.Namespace.EMail") != com.localnamespace.vo.EMail)
{
flash.net.registerClassAlias("Remote.Namespace.EMail", com.localnamespace.vo.EMail);
if (fbs != SystemManagerGlobals.topLevelSystemManagers[0])
{
trace(ResourceManager.getInstance().getString( "core",
"remoteClassMemoryLeak",
["com.localnamespace.vo.EMail","test7","_test7_FlexInit"]));
}
}
}
catch (e:Error)
{
flash.net.registerClassAlias("Remote.Namespace.EMail", com.localnamespace.vo.EMail);
if (fbs != SystemManagerGlobals.topLevelSystemManagers[0])
{
trace(ResourceManager.getInstance().getString( "core",
"remoteClassMemoryLeak",
["com.localnamespace.vo.EMail","test7","_test7_FlexInit"]));
}
}
3) If you cannot find registerClassAlias() call for you class, you can explicitly tell compiler to include your class. Just use another compiler option: "-includes com.localnamespace.vo.EMail"
No comments:
Post a Comment