This content has been marked as final. Show 5 replies
Just a note .. It is fixed already ... I don't understand why, but I was trying, on the Result function, to a loop in the ArrayCollection to try to look for a specific property and cast manually, but before that, I just declared a variable with the SUBPaymentClassC to hold the future cast object and it worked ...
Totally crazy, I know ... just declaring a variable ... not assigning anything to it ... Maybe a bug ... I don't know ...
But it is working ...
Search this forum for 'inheritance'. I remember a post by awaterma on this issue.
"fxBR" <email@example.com> wrote in message
> Just a note .. It is fixed already ... I don't understand why, but I was
> trying, on the Result function, to a loop in the ArrayCollection to try to
> for a specific property and cast manually, but before that, I just
> declared a
> variable with the SUBPaymentClassC to hold the future cast object and it
> Totally crazy, I know ... just declaring a variable ... not assigning
> to it ... Maybe a bug ... I don't know ...
second to last paragraph
Amy is right on. It's a bit counterintuitive but if there is no instantiation of the client side variable (despite having mapped the relationship between the remote and local classes) the client-side class apparently doesn't get exported so it can't be referenced. Just creating a dummy variable within Flex that instantiates the class does the trick. This is a hard one to catch if you haven't fun into it before.
Yes, the LCDS documentation says that you have to explicitly cast the result to the mapped Java entity.
You do not necessarily need to declare a variable.
In the ActionScript class, you use the [RemoteClass(alias=" ")] metadata tag to create an ActionScript object
that maps directly to the Java object. The ActionScript class to which data is converted must be used or referenced
in the MXML file for it to be linked into the SWF file and available at run time. A good way to do this is by casting
the result object, as the following example shows:
var result:MyClass = MyClass(event.result);
The class itself should use strongly typed references so that its dependencies are also linked.