I have previously used DTO in Flex which is mapped to a PHP DTO file. I used PHP through remoteobject (AMFPHP) to retrieve info from a MySQL database which is converted into the DTO type and then passed back to Flex to populate Datagrid.
The data used to populate the Datagrid is an ArrayCollection of DataVO, as follows.
Public Function OnResult(event:Object):void{
accountingdata:ArrayCollection = new ArrayCollection(ArrayUtil.toArray(event.result); ....
} I then used binding to populate a DataGrid with {accountingdata} then,
selectedItem as DataVO
The selected item on the DataGrid populates the variable selectedItem as follows.
selectedItem = event.target.selectedItem
I then populate textfields like so:
date_txtfield.text = selectedItem.date
accountno_txtfield.text = selectedItem.accountno
I have no problem with this as the data from the server side are DataVO objects as well.
However now I am trying to substitute my server side PHP scripts with Drupal contents/nodes and I am having conversion problems.
I am not knowledgable enough to convert the data retrieved from Drupal into DataVO format. I can still populate the Datagrid using the ArrayCollection but I am not able to populate the individual textfields with invididual attributes such as date, accountno etc.
As I am new to all this, could someone please provide instruction on how to do this (as detailed as possible)?
Thanks!