Title: dataProvider in custom component
<mx:Model id="myDataModel" source="test.xml"/>
<myComp dataProvider="myDataModel.customer"/>
 
This is one way, other way you can <mx:Modal /> in your component. That way, you will only pass xml path to the component...
 
<myComp source="test.xml" />
 
you can also allow users to set dataProvider, which sets the appropriate datastructure for your component...
 
<myCom dataProvider="[10, 20, 30, 30,]" /> 
 
 
If you want to change the data source on runtime, then you should use <mx:HTTPService /> tag to load data rather than <mx:Modal /> tag...
 
If you tell use more about how you want to achieve, we can further discuss...
 
-abdul
 
 


From: Artur de Paula Ribeiro [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 6:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dataProvider in custom component

How to load data from XML file in my custom component?

ex;
<mx:Model id="myDataModel" source="test.xml"/>
<myComp dataProvider="myDataModel.customer"/>

Im a flex beginner. :-)
   (As informações contidas nesta mensagem e nos arquivos anexados são para o uso exclusivo do destinatário aqui  indicado e  podem conter assuntos  comerciais,  de  propriedade intelectual  ou  outras informações confidenciais, protegidas pelas leis aplicáveis.  Caso não seja o destinatário correto, por favor, notifique o remetente imediatamente e elimine esta mensagem, uma vez que qualquer revisão, leitura, cópia e/ou divulgação do conteúdo desta mensagem são estritamente proibidas e não autorizadas. Obrigado por sua cooperação.       The information contained in this message and the attached files are restricted to the addressee, and may contain commercial  information, copyright, or other confidential information protected by law. If you are not the recipient, please notify the sender immediately and delete it from your system, since any change, reading, copy and/or dissemination of this e-mail is strictly prohibited and not authorized. Thank you.)  


Reply via email to