This content has been marked as final. Show 2 replies
In further debugging, I've found that it seems that if I add certain things, say Strings to the ArrayCollection, the header will get the values. So it must be the objects in the ArrayCollection which are somehow showing up as empty in the java decoding of the message. But I really don't know what could be causing it to fail like this with the current ArrayCollection. It is an array of ChartObjects which are actually created in Java, passed to flex and displayed in flex. Then when I want to delete the same objects, I pas the same array of ChartObjects which I created when the charts were first pushed from java to flex
Ok, so well no one responded...In case anyone in the future stumbles into this problem, I think I've found out the problem.
Since I was deleting this info, I was sending the delete request to my java code (which read the array of ChartObjects and deleted each one using the name of the chart to delete it from the database) and then immediately afterwards, I was deleting the same data structures in my flex code.
Apparently Flex doesn't copy the data and send it, but sends the actual data or a reference to it. So even though my lines to remove the data were after the database delete request, by the time the database deletion got executed in the system, the data had been erased by flex. It seems like Flex does not handle events in sequential order as it is written in the code. I've run into this in other places with messaging and flex. So I'll just have to rewrite the logic to take into account this behavior.