inline below...

On 7/14/06, Douglas Knudsen <[EMAIL PROTECTED]> wrote:

Clint, you missing some curlies in there? 



 
Where?
 

Another way is to use two binding tags




That was the example I gave... ?
 

<mx:Binding source="{nameTextInput.text}" destination=" vo.name" />
<mx:Binding source="{vo.name}" destination=" nameTextInput.text " />
<mx:TextInput id="nameTextInput"  />

yet another is
<mx:TextInput id="nameTextInput" text="{ vo.name}" change=" vo.name =nameTextInput.text" />







kewl... it's not bound tho.

which is best?  you like swiss or cheddar?


Swiss... they have funny clocks.

DK


On 7/14/06, Clint Modien <[EMAIL PROTECTED]> wrote:
It works like this...

// ------- myVO.as -----------
package {
public class myVO {
  public var name:String;
  public var phone:String;
}

// ------ SampleForm.mxml ---------
<mx:Script>   
    <![CDATA[
           public var vo:myVO;
     ]]>
</mx:Script>

<mx:Form>
  <mx:FormItem label="Name">
    <mx:TextInput id="nameTextInput" text="{ vo.name}" />
  </mx:FormItem>
  <mx:FormItem label="Phone">
    <mx:TextInput id="phoneTextInput" text="{vo.phone}" />
  </mx:FormItem>
</mx:Form>
// --------- here's how to create two way binding ------------
<mx:Binding source="nameTextInput.text" destination=" vo.name" />
<mx:Binding source="phoneTextInput.text" desitnation="vo.phone" />

On 7/14/06, jrjazzman23 < [EMAIL PROTECTED]> wrote:

I find myself wanting to do bidirectional binding, but I have the
feeling there may be some drawbacks to this.

I want a screen's controls to be initialized (bound to) a data model.
As the user changes the controls' values, I want the data model to
reflect this. In this case the data model is basically a VO. Is
there a best practice for this?

thanks

Jeremy





--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


__._,_.___

--
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




__,_._,___

Reply via email to