Are you talking about something like this:
?xml version=1.0?
!-- Models\XMLBinding.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:XML id=myEmployee format=e4x
employee
name
first{firstName.text}/first
:
xmlEmployee = event.result as XML;
Tracy
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Wednesday, January 02, 2008 12:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding
Are you
: Two way binding
Are you talking about something like this:
?xml version=1.0?
!-- Models\XMLBinding.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:XML id=myEmployee format=e4x
employee
name
first{firstName.text}/first
last{lastName.text}/last
/name
department
Subject: RE: [flexcoders] Re: Two way binding
Alright. Is the following correct:
Inside of a model I have it nodes bound to form items. In the form I
have it items bound to model's nodes, and xmlmodelvar = event.result as
XML will pull data into the model as well as show int in the form's
controls
snippets.
Tracy
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
Behalf Of mark goldin
Sent: Wednesday, January 02, 2008 1:34 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Two way binding
Alright. Is the following
Subject: [flexcoders] Re: Two way binding
Just conceptually:
Model:
?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml
mx:XML id=accidentsGeneral format=e4x
general
dateofaccident{dateofaccident.text}
/dateofaccident
otherrailroadinvolved
.
-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of
markgoldin_2000
Sent: Wednesday, January 02, 2008 1:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Two way binding
Just conceptually:
Model:
?xml version=1.0?
mx:Application
can you not just create a new ContactVO with your form control values
when the user goes to save their changes, and, depending on the
result from the server, either set your form controls back to the
model (you'll have to assign them manually as binding won't fire if
the values don't change)
You are right, it is because your model.pendingContact and
model.newContact are object references and not object instances. When
you do the assignment you are just pointing them to the same object in
memory - 2 references, 1 object. In your second case you create a
second object, 2 objects, 2
Thanks for you thought on this. Actually the only reason that I need
a copy of the object is to achieve the binding from the text field
back to the data model.
I created a simple function to bind the text field to a data model:
private function bindToInput(event:FlexEvent):void{
10 matches
Mail list logo