Resending since it bounced

 


From: Matt Chotin
Sent: Monday, November 07, 2005 9:20 PM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Re: custom components and custom data provider - howto?

 

Does test.xml start with <months> as the outer tag?  When factoring out between a source file and inline think of the <mx:Model> tag as the root tag of the external file.  So if you have testModel2 like in your example, in test.xml you should have:

 

<root>

  <months>

     <month name=”Jan”></month>

     …

  </months>

</root>

 

HTH,

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of negttid
Sent: Friday, November 04, 2005 6:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: custom components and custom data provider - howto?

 

I have found a solution by myself, but wonder it doesn't work with the XML from file the same way as embed XML:

testModel1 works!
testModel1 works not!

Why? Any ideas?


<mx:Model id="testModel1" source="test.xml" />

<mx:Model id="testModel2">
    <months>
        <month name="Jan"></month>
        <month name="Feb"></month>
        <month name="Mar"></month>
        <month name="Apr"></month>
        <month name="May"></month>
    </months>
</mx:Model>
<mx:HBox width="100%" height="100%" horizontalGap="1">
    <mx:Repeater id="month" dataProvider="{testModel1.months.month}">
       &! nbsp;< ;local:CalElement monthName="{month.currentItem.name}" verticalGap="2" />
    </mx:Repeater>
</mx:HBox>





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