Expand my Community achievements bar.

drupal and flex integration

Avatar

Level 1
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 (using Drupal as backend) 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!

1 Reply

Avatar

Level 1
If you make a call to drupal, through the Actionscript Remote
Object - you have to assign it a "return" function. If you put a
breakpoint in that return function and run it you can see what the
data looks like coming out of drupal. It's usually in an Object
variable with all the properties setup to your return types.



We've had great success parsing these objects directly from
Drupal in our actionscript code.



M@