with the Dataservice
And I get the error variable x is not defined
What I understand is the updated collection is not going to coldfusion
co.isUpdate() is returning false.
What am I missing?
Thanks
Flex code
===============
public function modifyItem(obj:ProductFileDetail,index:Number):void
{
fileCollection.setItemAt(obj,index) ;
}
And my cfm code is
=======================
<cffunction name="sync" output="no" returnType="array" access="remote">
<cfargument name="changes" type="array" required="yes">
<!-- array for the returned changes -->
<cfset var newchanges=ArrayNew(1)>
<!-- Loop over the changes and apply them --->
<cfloop from="1" to="#ArrayLen(changes)#" index="i" >
<cfset co = changes[i]>
<cfif co.isCreate()>
<cfset x = doCreate(co)>
<cfelseif co.isUpdate()>
<cfset x = doUpdate(co)>
</cfif>
<cfset ArrayAppend(newchanges, x)>
</cfloop>
<!-- Return the change objects, as this is how success or failure is
indicated --->
<cfreturn newchanges>
</cffunction>
The flex server dump displays the following after updating the
arraycollection content
================================================
[1] = (Typed Object #8 'flex.data.messages.DataMessage')
operation = 0
body = (Typed Object #9 'downloads.softwarepublishingtool.vo.ProductF
l')
language = "Portuguese (Brazilian)"
createdDate = null
createdBy = 1
status = "INACTIVE"
platformCode = "J2EE"
productName = "Authorware 1.1"
fileSize = 1
downloadTypeId = 1
fileType = ""
fileUrl = "test"
sku = "4"
productVersionId = 1
modifiedBy = 0
localeCode = "PT_BR"
id = 15
modifiedDate = Thu May 11 17:40:16 GMT+05:30 2006
11 17:40:16 GMT+05:30 2006
uid = "B79B31BD-4EAF-0AE6-DC83-235ABC13B518"
identity = (Object #11)
id = 15
correlationId = "D73884ED-B4A9-D4B7-37D4-235ABC1D10A0"
destination = "file"
timestamp = 0
body = (Ref #9)
clientId = "34D1A8DC-3A95-D6FB-96B6-234C0AF48C22"
timeToLive = 0
messageId = "16C1884E-ED22-2E3B-3C84-235ABC132DA8"
headers = (Object #12)
[2] = (Typed Object #13 'flex.data.messages.UpdateCollectionMessage')
updateMode = 0
replace = false
collectionId = (Array #14)
[0] = 1
[1] = 1
operation = 17
body = (Array #15)
[0] = (Typed Object #16 'flex.data.messages.UpdateCollectionRange')
identities = (Array #17)
[0] = "DE4975A3-5BF5-446E-93DA-234D2514BFA3"
position = 6
updateType = 1
[1] = (Typed Object #18 'flex.data.messages.UpdateCollectionRange')
identities = (Array #19)
[0] = "16C1884E-ED22-2E3B-3C84-235ABC132DA8"
position = 6
updateType = 0
identity = null
correlationId = "D73884ED-B4A9-D4B7-37D4-235ABC1D10A0"
destination = "file"
timestamp = 0
body = (Ref #15)
clientId = "312E4B57-0B0E-C9C6-000E-638064C18F69"
timeToLive = 0
messageId = "63D3212C-DB5A-2A9B-641D-235ABC1354D6"
headers = (Object #20)
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

