Hi
Matt,
It
works for my example, but when i'm using two nested Repeaters i'm in trouble
again. See my example code:
<mx:Model id="test">
<result>
<item>
<name>Item 1</name>
<subitem>
<name>Subitem 1</name>
</subitem>
</item>
</result>
</mx:Model>
<mx:ArrayCollection id="testAC" source="{mx.utils.ArrayUtil.toArray(test.item)}"/>
<mx:VBox>
<mx:Repeater id="rep" dataProvider="{testAC}">
<mx:Label text="{rep.currentItem.name}"/>
<mx:HBox>
<mx:Repeater id="rep2" dataProvider="{rep.currentItem.subitem}">
<mx:Label text="{rep2.currentItem.name}"/>
</mx:Repeater>
</mx:HBox>
</mx:Repeater>
</mx:VBox>
The
same problem i don't get the subitems only if i use more
subitems!
Must i
use two ArrayCollections?
Richard
Thanx!
-----Original
Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]On Behalf Of Matt Chotin
Sent: Wednesday, February 22, 2006 6:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Problem with Repeater
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]On Behalf Of Matt Chotin
Sent: Wednesday, February 22, 2006 6:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Problem with Repeater
You need to use mx.utils.ArrayUtil.toArray().
Matt
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Schutten
Sent: Tuesday, February 21, 2006 6:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with Repeater
Hi there,
I'm using Flex 2.0 Beta 1 and having a problem with using a Model as
dataProvider for the Repeater.
I entered an example code beneath:
<mx:Model id="test">
<result>
<item>Item 1</item>
</result>
</mx:Model>
<mx:VBox>
<mx:Repeater id="rep" dataProvider="{test.result.item}">
<mx:Label text="{rep.currentItem}"/>
</mx:Repeater>
</mx:VBox>
When the model contains one item, this code will not run. Using more
items
see code:
<mx:Model id="test">
<result>
<item>Item 1</item>
<item>Item 2</item>
<item>Item 3</item>
</result>
</mx:Model>
And it will run correctly!
As i read in the documentation the Repeater can be used for one or more
components.
Does anyone know what's wrong?
Greetings,
Richard
--
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
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.