I am having trouble serializing some objects from Java to
On 90% of my objects the mapping is fine, but on 10% the
mapping can not be found so flex defaults the object type to
Object, rather then the ActionScript type that has been defined.
All of the Java Objects to be mapped have a public no
argument constructor, and a getter and setter for each of the
properties to be mapped.
An example of two object, one where the mapping is found and
one where it is not:
public class Dimension extends Component
public var codeList:Codelist;
This maps ok, in debug mode I can see this is model.Dimension
public class FrequencyDimension extends Dimension
Mapping can not be found, in debug this maps to Object
(@MemRef) all of the Objects attributes properties come down the
wire, but the Object type is not found.
The Java class for FrequencyDimension is very simple, all it
does is have a default constructor and extend Dimension.
There does not seem to be any relationship between the
classes that don’t map, some extend already mapped classes
some do not, sometimes the bad mapping is in objects held in a
List, sometimes it isn’t. Actually, there is one
relationship, I think of the classes that don't map, they are the
latest classes written, and I wonder if this is a compiler issue,
not exporting the classes properly?
This seems to be because none of my code was explicitly
instantiating or using the type FrequencyDimension, so I guess it
was not compiled into the swf. This seems to be by design, although
IMHO this is bad design as it causes confusion when working with
DataServces and it forces unnecessary code to be written.