House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  Adobe Flex

Copy a RecordSet in Actionscript

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Steve Durette
07/20/2010 11:38 AM

Hi all, I have code that does flash remoting and gets back a query. What I need to be able to do is make a copy of the resulting RecordSet. The reason is that I have 2 dataGrids on my form, one is supposed to be editable, and one is supposed to show the "untainted" original data.  If I put the same data source for both dataGrids, then changes made in one reflect in the other. Thanks, Steve

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Palleas
07/20/2010 11:44 AM

ObjectUtil in flex has clone() and copy() methods, maybe it could help : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/ObjectUtil.html?allClasses=1 You have plenty of other solutions but I think this one is the easiest as you are already using flex. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
DURETTE, STEVEN J (ATTASIAIT)
07/20/2010 11:59 AM

Actually I'm using FlashForms, but most of the ActionScript was written using Flex books as a guide. Tried the ObjectUtil, but it didn't work.  Sorry, for a short while I was doing nothing but learning/using ActionScript for a project, then I've been off of it for more than 2 years. Now I'm trying to get back into it to fix a problem. Thanks, Steve ObjectUtil in flex has clone() and copy() methods, maybe it could help : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/ut ils/ObjectUtil.html?allClasses=1 You have plenty of other solutions but I think this one is the easiest as you are already using flex. > > Hi all, > > I have code that does flash remoting and gets back a query. What I need to > be able to do is make a copy of the resulting RecordSet. > > The reason is that I have 2 dataGrids on my form, one is supposed to be > editable, and one is supposed to show the "untainted" original data. If I ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
07/20/2010 12:21 PM

> Tried the ObjectUtil, but it didn't work. Can you provide more detail about what didn't work? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
DURETTE, STEVEN J (ATTASIAIT)
07/20/2010 12:42 PM

No error, but the page didn't render.  I commented out the code and the page worked again. I found a work around though, it isn't optimal, but it works.  I changed the cfc that returned the data to return a struct. In that struct is the original query and a duplicate. <cfset resultset.origQuery = myQuery /> <cfset resultset.backupQuery = myQuery /> When I cfreturn resultset, both items are available to the Actionscript and I can make changes to one without effecting the other. It works for now.  After I solve the user issue I will go back and see alternate ways of doing this (and if I'm just doing stuff wrong) Thanks for all the help. Steve > Tried the ObjectUtil, but it didn't work. Can you provide more detail about what didn't work? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
07/20/2010 12:54 PM

> No error, but the page didn't render.  I commented out the code and the > page worked again. OK, I see why - you're using Flash forms, not Flex 2+. That's an ActionScript 3 thing. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite


<< Previous Thread Today's Threads Next Thread >>

Search flex

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference