Unfortunately, bindings have the capability of making properties seem to 
"disappear" from the standpoint of serialization.  This happens because 
when a binding is applied to an value object, the bindings system 
invisibly replaces the var property with a getter/setter pair, and moves 
the actual property value to an altered name.  When the  player 
serializes the object, the property is no longer stored under its 
expected name, and so it is not encoded properly in the stream..

So at the moment, bindings and serialization simply don't mix.  This is 
expected to clear up in Flex 2.0, from what I've heard.  But in my view 
it's one of the more serious problems with Flex as it stands.

This causes a bunch of headaches, but it can be worked around. 
Essentially, one has to avoid serializing any object which may have 
active MXML bindings applied to it at the time.

.       .    .  . ...j

temporal_illusion wrote:
> Sure enough, it's something to do with the two way bindings!
> 
> If I have the binding from the value object to the text field it 
> causes a problem, but if I take off the binding it's fine.  I did a 
> two-way binding because I'll probably reuse this form for editing a 
> registration.
> 
> But it's not for all the fields even though they're all coded the 
> same as far as I can see!  So it must be some kind of timing thing.  
> I'm creating my VO on initialize.
> 
> Here's the code I've got: http://www.darkmatter.ca/flex/roexample.zip
> 
> The app is in the mxml directory, the cfc in the cfc directory, and 
> the FAST toolkit is in the user_classes directory.
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> 
> wrote:
> 
>>>The weird thing is even if I put a value in the 
>>>constructor of the value object and assign it to 
>>>these properties, the returned object still 
>>>contains nulls.. but if I update my GUI 
>>>(controls and validators are bound to the VO) 
>>>that parameter magically works.
>>
>>[Pete] (It may have nothing to do with this as it's not typically 
> 
> what
> 
>>one does when working with CFCs), but are you using either
>>Object.registerClass() or the _remoteClass property approach to map
>>client and server "value objects"? 
>>
>>Seeing some code for the ValueObject and CFC will definitely help - 
> 
> you
> 
>>can mail it to me off-list if it's more convenient.
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to