The problem is related to the format of the XML I think.  Here's a portion of my
php script (SQL statement not included).

 

$output = "<experiments>";

while (OCIFetchInto($result, $row, OCI_ASSOC)) 

{

      $output .=
"<experiment><title>".$row['TITLE']."</title><machine>".$row['MACHINE']."</machi
ne><username>".$row['USERNAME']."</username><details>".$row['DETAILS']."</detail
s><month>".$row['EMONTH']."</month><day>".$row['EDAY']."</day><year>".$row['EYEA
R']."</year></experiment>";

}

$output .= "</experiments>";

 

This works fine when using
display_experiments.lastResult.experiments.experiment.. but it does not work
when binding using a resultHandler as

 

[Bindable]

private var myExperiments:ArrayCollection;

 

private function resultHandler(event:ResultEvent):void

{

myExperiments=event.result.experiments.experiment;

}

 

And here's my HTTPService call:

<mx:HTTPService id="display_experiments" result = "resultHandler(event)"
url="http://localhost:8080/displayExperiments.php"; useProxy="false"
method="POST">  

      <mx:request xmlns="">

            <username>{username.text}</username>

      </mx:request>

</mx:HTTPService>

 

Trying to populate the datagrid with {myExperiments} doesn't work.

Do I need to output the XML in some other way? 

 

Thanks,

Tanya

 

 

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Cashorali, Tanya M.
Sent: Tuesday, January 30, 2007 4:58 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for
Datagrid

 

The datagrid doesn't even get populated and I'm making sure I actually send the
httpservice request on creationComplete of the datagrid itself.

I can drag ok when I use pseudo data that is not populated from the HTTPService.
I need the HTTPService to execute the php script which pulls the data off the
backend.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Tracy Spratt
Sent: Tuesday, January 30, 2007 4:44 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for
Datagrid

 

Whare are you stuck?

 

Can you populate the source datagrid ok?

 

Can you drag from the soruce to the target ok?

 

Do you need the HTTPService for updating the back-end, of for getting data into
flex?

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Cashorali, Tanya M.
Sent: Tuesday, January 30, 2007 4:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid

 

I have followed the example exactly as Adobe's book shows in Lesson 12 (Dragging
and Dropping Between Two Datagrids) with no luck.

 

I need to be able to bind the results of an HTTPService call (which executes a
php script and returns rows in XML format), to an ArrayCollection or whatever
datatype can populate a datagrid.

Everytime I drag and drop between two datagrids I need to change this
ArrayCollection.

 

Any help willl be greaaaatly appreciated please!!!  Also, is it better practice
to keep updating the database with every drag and drop, or to manipulate the
ArrayCollection clientside, and when all's said and done finally update the
database with one call?

 

Thank you 

THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY
FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL
AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER
USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR
ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS
INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND
PROPERLY DISPOSE OF THIS INFORMATION. 

THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY
FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL
AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER
USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR
ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS
INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND
PROPERLY DISPOSE OF THIS INFORMATION. 

 





THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY 
FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL 
AND/OR PRIVILEGED MATERIAL.  ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER 
USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR 
ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED.  IF YOU RECEIVED THIS 
INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND 
PROPERLY DISPOSE OF THIS INFORMATION.


Reply via email to