Mega Code Archive

 
Categories / Flex / Data Model
 

Use dot-delimited Strings with a nesting structure of elements

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">   <mx:Model id="userInfo">     <user>       <phoneInfo>         <homePhoneNum>{homePhoneInput.text}</homePhoneNum>       </phoneInfo>     </user>   </mx:Model>   <mx:PhoneNumberValidator id="hPNV"                             source="{userInfo.phoneInfo}"                          property="homePhoneNum"                           trigger="{homePhoneInput}"                          listener="{homePhoneInput}" />   <mx:Label text="Home Phone:" />   <mx:TextInput id="homePhoneInput" /> </mx:Application>