Hmm, you might need to implement mx.data.IManaged yourself instead of relying on IManaged.  IManaged extends IUID (you must have a string property uid) and IEventDispatcher (must be an event dispatcher).  You will then need to implement any managed property as follows (I haven’t tested this, it’s based on reading the generated actionscript for a [Managed] class):

 

import mx.data.utils.Managed;

 

    private var _test1:int;

 

    [Bindable(event="propertyChange")]

    public function get test1():int

    {

        _test1 = mx.data.utils.Managed.getProperty(this, "test1", _test1);

        return _test1;

    }

    public function set test1(value:int):void

    {

            var oldValue:int = this._ test1;

            _test1 = value;

            mx.data.utils.Managed.setProperty(this, "test1", oldValue, _test1);

    }

 

I have no guarantees, but see how it goes?

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jim Laing
Sent: Wednesday, August 16, 2006 8:27 AM
To: [email protected]
Subject: [flexcoders] FDS, VOs, and ignoring client-side properties

 

We're using FDS on our project, and we're using a single DataStore
with autoCommit=false on all of our DataServices. This way, we're able
to have a single, application-wide save button to commit all the
latest changes. This save button is enabled based upon on the
DataStores' commitRequired property.

In a few of my VOs, I have properties that do not have a corresponding
property in my server-side POJO. The reson is that these properties
are strictly used for keeping track of client-side state and are not
persisted in our database.

My problem is this: setting these properties on the client causes
commitRequired to become true on our DataStore. This is sort of
annyoing, as there really are no changes that need to be persisted. Of
course, hitting the save button sends back the objects to the server
where they are simply ignored because nothing has actually changed on
them.

So is there a way that I can force these properties to be ignored? Is
there some type of undocumented metadata tag that I'm missing? I seem
to remember something similar in Flex 1.5 to make serialization ignore
a property, but this is a slightly different case.

Jim

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to