This content has been marked as final. Show 3 replies
What happens if you trace
"Vesta0424" <firstname.lastname@example.org> wrote in message
> Thanks in advance for anyone's help. This is something that I find most
> confusing in Flex, working with the various datatypes, casting, what can
> cast as what, how to do it correctly, etc..
> The application on which I am working has a process where a user submits a
> request for leave (i.e., vacation) that is sent via a web service. The
> if the submit is successful, returns an Object that is essentially a copy
> the original request. I have no control over the return result -- that
> is, it
> is not possible to specify e4x as my return format. I have to work with
> object. This should be easy(?), but .....
Why is that not possible?
> I need to access a subset of the return object -- the detail (2 objects in
> this instance) -- and bind it to a DataGrid. Below is a trace of the
> object using ObjectUtil.toString(obj). How do I work with this data to
> at what I need?
Set the dataField on each datagrid column to the data you want?
I figured this out on my own. SInce the result is an object, I created a new object var to hold the response. Because the detail of the object was typed as an ArrayCollection, I could then set my Bindable ArrayCollection var to that section of the result. Solution:
private var confirmAC:ArrayCollection = new ArrayCollection;
private function submitResultHandler(event:* = null):void
var detailObj:Object = event.target.state[SubmitLeaveCommand.RESULT_NAME];
var tempAC:ArrayCollection = detailObj.details.detail;
Thanks for all the replies