By creating a value object. package com.mycompany.vo { public class ClientVO { public function ClientVO() { //constructor stuff; } public var id:Number; public var name:String; ... } }
import com.mycompany.ClientVO vo:ClientVO = new ClientVO(); vo.id = clientModel.id; vo.name = clientModel.name; ... Then you can pass around your form data as needed. HTH Jeff -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ronnlixx Sent: Monday, February 12, 2007 4:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] referencing form data in class based model? Hi, How do you reference form data or controls in a imported custom class? for example, how would I port this mxml based model to a class based model? <mx:Model id="clientModel"> <client> <id>{clientList.selectedItem.id}</id> <name>{client_name.text}</name> <address>{client_address.text}</address> <initials>{client_initials.text}</initials> <city>{client_city.text}</city> <state>{client_state.text}</state> <zip>{client_zip.text}</zip> <phone>{client_phone.text}</phone> <fax>{client_fax.text}</fax> <url>{client_url.text}</url> </client> </mx:Model> thanks for any input -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links