[flexcoders] show data tips not working for datagrid
I'm trying to get a certain field to show up because it is clipped by the cell in my datagrid. I've set showDataTips = 'true' in the datagrid column that I want to show. I've also set a dataTipFunction = showDetails on the datagrid itself and for the column. The function looks like this: private function showDetails( item:Object ) : String { var xmlItem:XML = item as XML; return [EMAIL PROTECTED]; } Nothing is happening though, no pop-up box, nothing. I am using an XMLListCollection as the dataprovider for the datagrid. 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 Compliance HelpLine at 800-856-1983 and properly dispose of this information.
[flexcoders] help with httpservice result as dataprovider for datagrid
I have a datagrid whose dataprovider is this: mx:XMLListCollection id = experiments filterFunction=filter2 source={display_experiments.lastResult.experiment}/ I want to be able to double click on a row in the dg, which opens a pop-up window where I can edit information and then update it. The problem is, when I use change or collectionChange, I can't even click on a row because it refreshes as soon as I try. Not only that, but my results are not updated right away, it usually takes a few updates to see the changes. I have set makeObjectsBindable to true in my httpservice calls. Thanks for any input on this 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 Compliance HelpLine at 800-856-1983 and properly dispose of this information.
[flexcoders] convert e4x xml results to arraycollection or xmllistcollection
I want to filter the results (which are in e4x format) of an HTTPService call (display_samples) and push certain ones into a new arrayCollection. This code populates a Tree just fine: mx:XMLListCollection id = all_samples source={display_samples.lastResult.sample}/ But when I do this: Alert.show(all_samples.length.toString()); It's showing the size as 0. I can't seem to interact with the data at all. I also tried an arraycollection and I'm making sure I set it after I send() the HTTPService request. These also don't work: new ArrayCollection(display_samples.lastResult.sample) display_samples.lastResult.sample as ArrayCollection Any ideas? Thanks 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.
RE: [flexcoders] convert e4x xml results to arraycollection or xmllistcollection
I ended up using a filterfunction on the XMLListCollection and it works like a charm. Here's the code if anyone's interested: mx:XMLListCollection id = all_samples filterFunction=myFilter source={display_samples.lastResult.sample}/ public function myFilter(item:Object):Boolean { return [EMAIL PROTECTED] == complete; } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Tuesday, February 13, 2007 11:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] convert e4x xml results to arraycollection or xmllistcollection I want to filter the results (which are in e4x format) of an HTTPService call (display_samples) and push certain ones into a new arrayCollection. This code populates a Tree just fine: mx:XMLListCollection id = all_samples source={display_samples.lastResult.sample}/ But when I do this: Alert.show(all_samples.length.toString()); It's showing the size as 0. I can't seem to interact with the data at all. I also tried an arraycollection and I'm making sure I set it after I send() the HTTPService request. These also don't work: new ArrayCollection(display_samples.lastResult.sample) display_samples.lastResult.sample as ArrayCollection Any ideas? Thanks 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.
[flexcoders] HTTPService updating database too frequently??
I have datagrids whose dataproviders are the lastResult of httpservice calls. The HTTPService calls are calling PHP scripts that update, remove, and create rows. I have a function that lets me double click an item in a datagrid and pop up a window which then lets me edit the info. The only problem is, the data doesn't always update right away even though I am explicitly calling a refresh method after every change. It sometimes works right away, then other times it lags and the change doesn't show up until I edit something else. Should I be doing this in a different manner? Thanks, Tanya 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.
[flexcoders] Problem populating datagrid after state change, need a Repeater maybe?
I have a form collecting data about an experiment. There's a numeric stepper that specifies number of repeated experiments there will be. Once the user enters all the data and presses submit, there's a state change triggered if the numeric stepper value is 1. I'd like the data from the form to be repeated the number of times specified and the only item that would change is the name of the experiment. These could also be text boxes that are editable so that the user can change certain aspects of each experiment. At this point, I can't even populate a datagrid manually.I also tried using a Repeater with no luck, I could only get the currentItem, it didn't generate multiple textboxes based on an ArrayCollection. 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.
RE: [flexcoders] detect XML node on click in Tree
Thank you! Worked like a charm. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Tuesday, February 06, 2007 1:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] detect XML node on click in Tree selectedItem gives you a reference to the node. Probably what you are seeing is because the event is just an Object containing the xml, so some propeties are not visible. Cast/convert the result into an xml object: var oItem:Object = event.currentTarget.selectedItem; var xmlItem:XML = XML(oItem) xmlItem will be the node. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of TCash21 Sent: Tuesday, February 06, 2007 12:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] detect XML node on click in Tree I have a Tree that's populated based on e4x XML, which is generated by PHP from querying the backend. I have a structure like this: projects project experiments experiment /experiment /experiments /project /projects I'd like to be able to double click on an item in the Tree and change to the necessary viewStack page, which will allow the user to edit the info. The viewStack page will depend on whether the user clicked on a project or experiment. So far I've tried using onChange(event), event.currentTarget.selectedItem, which only gives me certain attributes. I just want to be able to somehow know which XML node experiment or project was clicked so I can open the right window. I've been reading about ItemRenderers, will I need to use one? I'm familiar with eventListeners but I'm still unsure about how to get the appropriate XML node based on a click. Thanks for any help. 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.
[flexcoders] Can editable row in datagrid depend on what node clicked in tree?
Now that I can determine what type of node was clicked in a tree (thank you Tracy!), I'd like to be able to edit that entity as well.. but in a separate datagrid. Right now, I have the viewStack selectedChild updating depending on what node was clicked. Is it possible to now initiate an itemEditing on the new datagrid that appears? (which contains certain nodes in the tree). Basically, as soon as I double click the node in the tree, I want the editable option enabled on that row in the datagrid that shows up. If that's not possible, can I at least set the selectedItem to the one I clicked in the tree? Of course the selectedIndex is going to vary between the tree and datagrid on the same item. 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.
RE: [flexcoders] Re: Why does it fail when only 1 item in the result xml (HTTPservice)
Try: if (event.result.action.item is ObjectProxy ) I had to do the same thing to fix the 1 xml node problem. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of oneproofdk Sent: Monday, February 05, 2007 1:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Why does it fail when only 1 item in the result xml (HTTPservice) Thanks for your reply! How can I test what datatype Flex has decided ?, I cant always tell if there will be more than one item in the result. Thanks, Mark --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , jer_ela [EMAIL PROTECTED] wrote: When Flex converts xml into flex data types, it makes its best guess as to hat is appropriate. When it sees repeating elements it decides arrayCollection. When it sees a single element or multiple different elements it decides objectProxy. You need to check the type of the event.result.action.item and set jobDetails to it if it is an array collection, or make jobDetails a new arrayCollect and addItem(event.result.action.item) to it if it is an objectProxy. 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.
[flexcoders] Custom components and handling variables
I'm still learning how I should be designing custom components and encapsulating methods/variables appropriately. I have a custom component that pops up and just adds/removes items from two arraycollections. After this is done, I'd like to close it and reflect the changes on the main application page. I'm just wondering how to access variables from custom components. Is this good practice or should these variables be initialized in the main application first? 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.
RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid
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 .= experimenttitle.$row['TITLE']./titlemachine.$row['MACHINE']./machi neusername.$row['USERNAME']./usernamedetails.$row['DETAILS']./detail smonth.$row['EMONTH']./monthday.$row['EDAY']./dayyear.$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 gretly 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.
RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid
Still no luck.. I'm trying to check the length of the array and an Alert.show() won't even display anything. Could it be order in which I'm executing everything? For instance, I can't call the display_experiments.php script until after a user has logged in so it can query the database for his experiments. I have a checkLogin function that sends the display_experiments HTTPService call after the user has logged in. What could I be doing wrong? -Tanya From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes Sent: Wednesday, January 31, 2007 10:41 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid on return use myExperiments = new ArrayCollection(event.result.experiments.experiment); if expirement is the repeating element, then you need to use (event.result.expirements) b. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 31, 2007 8:32 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid 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 .= experimenttitle.$row['TITLE']./titlemachine.$row['MACHINE']./machi neusername.$row['USERNAME']./usernamedetails.$row['DETAILS']./detail smonth.$row['EMONTH']./monthday.$row['EDAY']./dayyear.$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 gretly 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
RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid
Please I just need to know how to bind the results of an HTTPService request (which generates XML) to an ArrayCollection!!! I don't think it should be this difficult!?! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 31, 2007 11:16 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid Still no luck.. I'm trying to check the length of the array and an Alert.show() won't even display anything. Could it be order in which I'm executing everything? For instance, I can't call the display_experiments.php script until after a user has logged in so it can query the database for his experiments. I have a checkLogin function that sends the display_experiments HTTPService call after the user has logged in. What could I be doing wrong? -Tanya From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes Sent: Wednesday, January 31, 2007 10:41 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid on return use myExperiments = new ArrayCollection(event.result.experiments.experiment); if expirement is the repeating element, then you need to use (event.result.expirements) b. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 31, 2007 8:32 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid 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 .= experimenttitle.$row['TITLE']./titlemachine.$row['MACHINE']./machi neusername.$row['USERNAME']./usernamedetails.$row['DETAILS']./detail smonth.$row['EMONTH']./monthday.$row['EDAY']./dayyear.$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 gretly 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
RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid
Ok after a lot of painful debugging.. I've found something strange. Instead of an ArrayCollection, I declared myExperiments as an Object. The XML format is like this: experiments experiment title/title machine/machine username/username /experiment experiment title/title machine/machine username/username /experiment /experiments private function resultHandler(event:ResultEvent):void { myExperiments = event.result.experiments.experiment; } Then I set my dataprovider in my datagrid = myExperiments and for some reason this works to display the experiments. Why doesn't an ArrayCollection work? Sorry for all the emails but this has been a problem for too long and seems like it should be simple. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 31, 2007 12:36 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid Please I just need to know how to bind the results of an HTTPService request (which generates XML) to an ArrayCollection!!! I don't think it should be this difficult!?! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 31, 2007 11:16 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid Still no luck.. I'm trying to check the length of the array and an Alert.show() won't even display anything. Could it be order in which I'm executing everything? For instance, I can't call the display_experiments.php script until after a user has logged in so it can query the database for his experiments. I have a checkLogin function that sends the display_experiments HTTPService call after the user has logged in. What could I be doing wrong? -Tanya From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes Sent: Wednesday, January 31, 2007 10:41 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid on return use myExperiments = new ArrayCollection(event.result.experiments.experiment); if expirement is the repeating element, then you need to use (event.result.expirements) b. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 31, 2007 8:32 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding HTTPService xml to ArrayCollection for Datagrid 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 .= experimenttitle.$row['TITLE']./titlemachine.$row['MACHINE']./machi neusername.$row['USERNAME']./usernamedetails.$row['DETAILS']./detail smonth.$row['EMONTH']./monthday.$row['EDAY']./dayyear.$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
[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 gretly 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.
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 gretly 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.
[flexcoders] multiple click actions
I have a view stack which changes views based on whatever button is clicked on an application control bar... mx:Button id = myProjects label=My Projects click=myViewStack.selectedChild=projects; / As soon as you click 'myProjects' the view changes to a datagrid. But I also want to populate this datagrid by default as soon as it is loaded, I normally would have sent an HTTPrequest through that click action. Any suggestions?? I'm still very new to Flex and am getting used to basic architecture, whether to use state transitions or view stacks.. dynamically load components,etc... Is it necessary to make an HTTPrequest everytime I want to access/modify the database, and to have separate PHP scripts for every command? Thank you! -Tanya 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.
RE: [flexcoders] multiple click actions
Ok I ended up just using a creationComplete = refreshProjects(); in the datagrid tag. Thanks anyway! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cashorali, Tanya M. Sent: Wednesday, January 24, 2007 3:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] multiple click actions I have a view stack which changes views based on whatever button is clicked on an application control bar... mx:Button id = myProjects label=My Projects click=myViewStack.selectedChild=projects; / As soon as you click 'myProjects' the view changes to a datagrid. But I also want to populate this datagrid by default as soon as it is loaded, I normally would have sent an HTTPrequest through that click action. Any suggestions?? I'm still very new to Flex and am getting used to basic architecture, whether to use state transitions or view stacks.. dynamically load components,etc... Is it necessary to make an HTTPrequest everytime I want to access/modify the database, and to have separate PHP scripts for every command? Thank you! -Tanya 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.
RE: [flexcoders] multiple file upload and php problems
Yes, I fixed the problem.. I just had to find where in the flex the name of the uploaded file was. Now I'm trying to upload files to a remote server, but I think I will need to pass login credentials to it as well. Any tips on this? Thank you -Original Message- From: flexcoders@yahoogroups.com on behalf of Clint Tredway Sent: Fri 1/19/2007 2:16 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] multiple file upload and php problems are you uploading to the same domain the flex app is on? On 1/19/07, TCash21 [EMAIL PROTECTED] wrote: Hi Everyone, I'm very new to Adobe Flex. I'm trying to run the sample code supplied here: http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html Of course the upload script is written in coldfusion but I need it in PHP. I've tried very basic upload scripts as well as this one: http://codycodingcowboy.cahlan.com/files/php_fileuploads.html When I compile, I'm able to browse files, get the file size, but when I click upload or cancel I get [SecurityErrorEvent type = securityError bubbles = false cancelable = false eventPhase = 2 text = Error #2049] I guess I'm still unclear as to how the PHP is supposed to communicate with Flex if the script is not returning XML. Any suggestions would be greatly appreciated... even a simple single file upload sample code. Thanks -- http://indeegrumpee.spaces.live.com/ 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. winmail.dat