Well,

To's seem to work perfectly the only gotcha that I couldn't manage is related 
records. 
Fill, sync, get and count methods all work well with reactor. 

Related records are defined in the flex-data-service.xml.

Using the samples (contact manager) 
I defined a employee inside my company destination. 
<properties>
        <metadata>
                <identity property="Companyid"/>
                <one-to-many property="employees" destination="employee"/>
        </metadata>
</properties>

I also added to my CompanyTO and my CompanyAS3 class an employees variable of 
type ArrayCollection for the AS3 and myPathToMyToObject[] for the CFC file.

In the CFC
<cfproperty name="employees" type=" myPathToMyToObject[] ">
<cfset this.employees  = arraynew(1)/>

In my AS3 
        public var employees:ArrayCollection;
        
        public function employeesTomssql()
                {
                        employees = new ArrayCollection();      
                }



When I call my get method on my Company destination, debugging the CF side I 
get the correct object (My CompanyTo with a variable employees that is an Array 
of employeeTo but in the debugging side of FB I get the Company Object 
correctly except for the employees variables that once I get type DataList, 
(and is always empty) and sometimes I get ArrayList type  (and the results are 
there). It's totally ramdom. The same object sometimes gives me 0 employees and 
sometimes the correct amount.

Any thoughts about I might be doing wrong? This part I'm going to post in 
FlexCoders.

Anyway, for the sync method it accepts as argument an array of beans with this 
methods:

toString (returns java.lang.String)
getMessage (returns flex.data.messages.DataMessage)
fail (returns void)
fail (returns void)
getObjectId (returns java.lang.Object)
processed (returns void)
conflict (returns void)
conflict (returns void)
createErrorMessage (returns flex.messaging.messages.ErrorMessage)
copyFrom (returns void)
setObjectId (returns void)
setNewVersion (returns void)
setPreviousVersion (returns void)
setChanges (returns void)
getNewVersion (returns java.lang.Object)
isCreate (returns boolean)
isUpdate (returns boolean)
getPreviousVersion (returns java.lang.Object)
isDelete (returns boolean)
getChangedPropertyNames (returns [Ljava.lang.String;)
addChangedPropertyName (returns void)
getChangedValues (returns interface java.util.Map)
getPreviousValue (returns java.lang.Object)
getServerVersion (returns java.lang.Object)
setServerVersion (returns void)
getChanges (returns [Ljava.lang.Object;)
getConflictingPropertyNames (returns interface java.util.List)
hashCode (returns int)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
equals (returns boolean)
notify (returns void)
notifyAll (returns void)

Most relevant are:
isCreate(), isUpdate(), isDelete() (quite obvious no?)
getPreviousVersion(), getNewVersion() (returns the correspondant TO, before and 
after changes)
fail() marks with a message that something went wrong
processed() (obvious)           


João Fernandes
Dep. Informática - Área de Desenvolvimento
Cofina media

Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel (+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sean Corfield
Sent: sábado, 25 de Março de 2006 23:14
To: [email protected]
Subject: Re: [Reactor For CF] Reactor and Flex Data Services

On 3/25/06, Doug Hughes <[EMAIL PROTECTED]> wrote:
> So, what about the data typing of getters/setters on records?  
> Wouldn't flex have issues with the fact that they're all string 
> values?  Or should the cfproperty tags define the correct types?

Correct. <cfproperty/> is needed precisely because ColdFusion is typeless. The 
CFC/As conversion is driven solely by the <cfproperty/> tags.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

 

-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/





-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to