Oh, so is it a ColdFusion-side question? I pass whatever data there is
on the flex side (text,object,array, selectedItems, etc.) back to the
CFC via a single Object.

The CFC argument must be of type Struct.

In this example below, gridData might be myGrid.selectedItems, or
myGrid.dataProvider passed in the mydata object. Then I just loop
through the Array and do the insert or update.

<cffunction name="saveRelease" access="remote"  returntype="void">
<cfargument name="mydata" type="struct" required="true">
                        
<cfloop from="1" to="#ArrayLen(mydata.gridData)#" index="i">
                
<cfquery name="savedata" datasource="da8_Constellation">
INSERT INTO CRreleased
(WeekEnding,planned,plannedReleased,unplannedReleased,externalReleased)
VALUES
(#mydata.gridData[i].WeekEnding#,#mydata.gridData[i].planned#,#mydata.gridData[i].plannedReleased#,#mydata.gridData[i].unplannedReleased#,#mydata.gridData[i].externalReleased#)
</cfquery>
                
</cfloop>
</cffunction>


Don


--- In [email protected], "markflex2007" <[EMAIL PROTECTED]>
wrote:
>
> Hi Don,
> 
> I have read the code in your demo. but this one is show us how to read
> data from coldfusion cfc and save to flex Arraycollection.
> 
> My question is how to update database with cfc after I pass updated
> ArrayCOllection from Flex.
> 
> Thanks a lot
> 
> Mark
> 
> --- In [email protected], "Don Kerr" <fusionpage@> wrote:
> >
> > I put this demo together for my Space City AUG meeting to show the
> > basics of ColdFusion-Flex. I think these two examples will get you
> > what you need
> > http://www.fusionpage.com/flex/demos/bin/demos.html
> > 
> > Don Kerr
> > 
> > 
> > 
> > --- In [email protected], "markflex2007" <markflex2007@>
> > wrote:
> > >
> > > A documentation said Flex ArrayCollection maps to Coldfusion query,
> > > 
> > > Do you have a sample to do this so I can understand it.
> > > 
> > > Thnaks
> > > 
> > > Mark
> > > 
> > > --- In [email protected], Jeffry Houser <jeff@> wrote:
> > > >
> > > > 
> > > >   ArrayCollection maps to an Array
> > > > 
> > > >   I'm sure this is documented somewhere; did you look?
> > > > 
> > > > markflex2007 wrote:
> > > > > 
> > > > > 
> > > > > How to pass Flex ArrayCollection to Coldfusion CFC?
> > > > > 
> > > > > Which data type in coldfusion can accept Flex ArrayCollection?
> > > > > 
> > > > > Thanks
> > > > > 
> > > > > Mark
> > > > > 
> > > > > 
> > > > 
> > > > -- 
> > > > Jeffry Houser
> > > > Flex, ColdFusion, AIR
> > > > AIM: Reboog711  | Phone: 1-203-379-0773
> > > > --
> > > > Adobe Community Expert 
> > > >
<http://www.adobe.com/communities/experts/members/JeffryHouser.html>
> > > > My Company: <http://www.dot-com-it.com>
> > > > My Podcast: <http://www.theflexshow.com>
> > > > My Blog: <http://www.jeffryhouser.com>
> > > >
> > >
> >
>


Reply via email to