<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Displaying RadioButton controls using the Repeater in Flex (redux)</title>
	<atom:link href="http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vaibhav</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-9201</link>
		<dc:creator>Vaibhav</dc:creator>
		<pubDate>Thu, 05 May 2011 20:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-9201</guid>
		<description>Hi,
I am having similar problem, when I have used data binding but the repeater does not repeat itself when the data source changes.
My Code::

  
   
   	 
 
        
           
        
         
           
        
    
     
     
 

The Chart data was static initially and then when I added the function &quot;executeBindings(true);&quot;, then, I saw the chage in my Charts. (when my dataSource was modifyied dynamically )
However, when I have my debuffer on the  after the data has been loaded initially and when i change the datasource (selectedSectors), I can see the change in selectedSectors but the debugger never comes to the  tag

In my output, my Chart data is displayed only for the modified datasource but for the rest, emplty charts are been seen.

Would appreciate any help :)
Thank you in advance</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am having similar problem, when I have used data binding but the repeater does not repeat itself when the data source changes.<br />
My Code::</p>
<p>The Chart data was static initially and then when I added the function &#8220;executeBindings(true);&#8221;, then, I saw the chage in my Charts. (when my dataSource was modifyied dynamically )<br />
However, when I have my debuffer on the  after the data has been loaded initially and when i change the datasource (selectedSectors), I can see the change in selectedSectors but the debugger never comes to the  tag</p>
<p>In my output, my Chart data is displayed only for the modified datasource but for the rest, emplty charts are been seen.</p>
<p>Would appreciate any help :)<br />
Thank you in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ven</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-7891</link>
		<dc:creator>Ven</dc:creator>
		<pubDate>Thu, 10 Jun 2010 17:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-7891</guid>
		<description>Hi Peter,

I am getting an error of  &quot;Error #1007: Instantiation attempted on a non-constructor. for the following code. the repeater is unable to repeat the custom component.

wRepeater = new Repeater();
var descProps:Object = {};
descProps.type = recData;
descProps.document = this;
descProps.propertiesFactory = function():Object{return {infoData: wRepeater.currentItem}};
var recordDescriptor:UIComponentDescriptor =  new UIComponentDescriptor(descProps as RecordDataComp);
acData = createRecordData(featureSet); //this returns as an array collection after an rest based service call.
wRepeater.dataProvider = acData;
wRepeater.childDescriptors = [recordDescriptor];
wRepeater.initializeRepeater(vBox2, true); // At this point I am getting the above said error.
vBox1.addChild(wRepeater);

Here  &#039;RecordDataComp&#039; is the custom component made up with VBox consisting an two text components in another VBox.
&#039;acData&#039; is ArrayCollection
&#039;infoData&#039; is the public property in &#039;RecordDataComp&#039;  actionscript class.
&#039;recData&#039; is the instance of &#039;RecordDataComp&#039;  
&#039;wRepeater&#039; is the instance of &#039;Repeater&#039;

Any help would be appreciated.

Thanks in advance.
-Ven.</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I am getting an error of  &#8220;Error #1007: Instantiation attempted on a non-constructor. for the following code. the repeater is unable to repeat the custom component.</p>
<p>wRepeater = new Repeater();<br />
var descProps:Object = {};<br />
descProps.type = recData;<br />
descProps.document = this;<br />
descProps.propertiesFactory = function():Object{return {infoData: wRepeater.currentItem}};<br />
var recordDescriptor:UIComponentDescriptor =  new UIComponentDescriptor(descProps as RecordDataComp);<br />
acData = createRecordData(featureSet); //this returns as an array collection after an rest based service call.<br />
wRepeater.dataProvider = acData;<br />
wRepeater.childDescriptors = [recordDescriptor];<br />
wRepeater.initializeRepeater(vBox2, true); // At this point I am getting the above said error.<br />
vBox1.addChild(wRepeater);</p>
<p>Here  &#8216;RecordDataComp&#8217; is the custom component made up with VBox consisting an two text components in another VBox.<br />
&#8216;acData&#8217; is ArrayCollection<br />
&#8216;infoData&#8217; is the public property in &#8216;RecordDataComp&#8217;  actionscript class.<br />
&#8216;recData&#8217; is the instance of &#8216;RecordDataComp&#8217;<br />
&#8216;wRepeater&#8217; is the instance of &#8216;Repeater&#8217;</p>
<p>Any help would be appreciated.</p>
<p>Thanks in advance.<br />
-Ven.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-6937</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Fri, 05 Feb 2010 22:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-6937</guid>
		<description>Hey Peter, this is the exact solution I needed for a component in my current project.  I&#039;m using the exact same method as demonstrated in your example but I&#039;m having one problem that I cannot seem to solve.  After the initial creation of the Repeater and its children, the parent and parentDocument property on the Repeater itself as well as it&#039;s children is null.  When I try and remove an item from the dataProvider the framework throws an RTE because it needs those properties to update the Repeater&#039;s display list.  Any insight into what I may be doing wrong?

Thanks,
Jamie</description>
		<content:encoded><![CDATA[<p>Hey Peter, this is the exact solution I needed for a component in my current project.  I&#8217;m using the exact same method as demonstrated in your example but I&#8217;m having one problem that I cannot seem to solve.  After the initial creation of the Repeater and its children, the parent and parentDocument property on the Repeater itself as well as it&#8217;s children is null.  When I try and remove an item from the dataProvider the framework throws an RTE because it needs those properties to update the Repeater&#8217;s display list.  Any insight into what I may be doing wrong?</p>
<p>Thanks,<br />
Jamie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-6330</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 12 Nov 2009 04:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-6330</guid>
		<description>
	
		
	
 , i want to do it the above mxml in as3... anyone help me.. i cannt repeat the datas in repeater while using in as3


box_v=new VBox();
			babyactimg=new Image();
			rep=new Repeater();
			addChild(box_v);
		    rep.dataProvider=cat.img;
		    babyactimg.source=rep.currentItem.@src;
			babyactimg.width=30;
			babyactimg.height=30;
			addChild(babyactimg);
			box_v.addChild(rep); 
this was i done in as3 but i got the first record only...what can i do for get all the records  from the repeater using as3..</description>
		<content:encoded><![CDATA[<p>, i want to do it the above mxml in as3&#8230; anyone help me.. i cannt repeat the datas in repeater while using in as3</p>
<p>box_v=new VBox();<br />
			babyactimg=new Image();<br />
			rep=new Repeater();<br />
			addChild(box_v);<br />
		    rep.dataProvider=cat.img;<br />
		    babyactimg.source=rep.currentItem.@src;<br />
			babyactimg.width=30;<br />
			babyactimg.height=30;<br />
			addChild(babyactimg);<br />
			box_v.addChild(rep);<br />
this was i done in as3 but i got the first record only&#8230;what can i do for get all the records  from the repeater using as3..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-5782</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Wed, 16 Sep 2009 02:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-5782</guid>
		<description>Hello friend

Excellent article, I&#039;m trying to do something close to this, but I&#039;m having trouble, I wonder if I can help, here&#039;s what I&#039;m doing:
I built a panel only via code and put it in a Canvas also via code and then a vbox and finally put a Canvas (which I want to repeat), I sought data from a php file, but so far I could not do repeat, here&#039;s the code:

		import mx.core.UIComponentDescriptor;
		import mx.controls.Text;
		import mx.controls.Image;
		import mx.controls.Label;
		import mx.managers.PopUpManager;
		import mx.containers.Panel;
		import mx.core.Repeater;
		import mx.containers.Canvas;
		import mx.containers.VBox;
		import mx.controls.Label;
		public var canvas:Canvas;
		public var vbox:VBox;
		public var rep:Repeater;
		public var win:Panel;
		public var msgErr:Text;
		public var imgClose:Image;
		public var title:Label;

	public function winFiles(evt:Event):void {
		param = new Text();	
		param.text = evt.currentTarget.automationName;
		recFiles.send();
	}

	
		
			{ param.text}
		
	
	private function checkFiles(evt:ResultEvent):void {
			win       = new Panel();
			imgClose = new Image();

			imgClose.source = &quot;../images/close.png&quot;;
			imgClose.scaleContent = true;
			imgClose.autoLoad     = true;
			imgClose.toolTip      = &quot;FECHAR&quot;;	
			imgClose.setStyle(&quot;right&quot;,&quot;5&quot;);
			imgClose.setStyle(&quot;top&quot;,&quot;5&quot;);	
			imgClose.y = 50;	
			imgClose.buttonMode   = true;				
		if(evt.result.dados.registros == &quot;0&quot;) {
			msgErr    = new Text();
			win.width  = 380;
			win.height = 355;
			win.title = &quot;:: Anexos (&quot;+evt.result.dados.registros+&quot;)&quot;;
			win.x = (Application.application.width - win.width) / 2; 
			win.y = (Application.application.height - win.height) / 2;
			win.layout = &quot;absolute&quot;;	
			
			msgErr.text = &quot;no file found&quot;;
			msgErr.setStyle(&quot;left&quot;,&quot;5&quot;);
			msgErr.setStyle(&quot;top&quot;,&quot;5&quot;);
			msgErr.width  = 180;
			msgErr.height = 50; 
			
			win.addChild(msgErr);
			PopUpManager.addPopUp(win,panel1,true);						
		} else {
			canvas  = new Canvas();
			rep     = new Repeater();
			vbox    = new VBox();
			
			var canvBox:Canvas = new Canvas();
			var lblname:Label  = new Label();
			var name:Label     = new Label();
			var date:Label     = new Label();
			var hour:Label     = new Label();
												
			win.width = 380;
			win.height = 355;
			win.title = &quot;:: Anexos (&quot;+evt.result.dados.registros+&quot;)&quot;;
			win.x = (Application.application.width - win.width) / 2; 
			win.y = (Application.application.height - win.height) / 2;
			win.layout = &quot;absolute&quot;;	
			
			canvas.width = 355;
			canvas.height= 260;
			canvas.setStyle(&quot;left&quot;,&quot;0&quot;);
			canvas.setStyle(&quot;top&quot;,&quot;50&quot;);
			
			vbox.setStyle(&quot;left&quot;,&quot;5&quot;);
			vbox.setStyle(&quot;top&quot;,&quot;0&quot;);
			vbox.setStyle(&quot;verticalGap&quot;,&quot;6&quot;);			
			vbox.width  = 335;
			vbox.height = 260;
							
			canvas.addChild(vbox);	
				
			canvBox.width = 320;
			canvBox.height= 60;
			canvBox.setStyle(&quot;backgroundColor&quot;,&quot;#ededed&quot;);
			canvBox.setStyle(&quot;borderStyle&quot;,&quot;solid&quot;);
			canvBox.setStyle(&quot;cornerRadius&quot;,&quot;5&quot;);

			vbox.addChild
			
			var repAnexos:UIComponentDescriptor = new UIComponentDescriptor(canvBox);							

			rep.dateProvider = recAnexos.lastResult.anexos;	
			rep.childDescriptors = [repAnexos];
			rep.initializeRepeater(vbox, true);		
			
			vbox.addChild(rep);
			
			lblname.text = &quot;Name:&quot;;
			lblname.setStyle(&quot;fontWeight&quot;,&quot;bold&quot;);
			lblname.setStyle(&quot;left&quot;,&quot;0&quot;);
			lblname.setStyle(&quot;top&quot;,&quot;5&quot;);
			lblname.width = 100;
			

			name.setStyle(&quot;left&quot;,&quot;110&quot;);
			name.setStyle(&quot;top&quot;,&quot;5&quot;);
			name.width = 100; 
								
			canvBox.addChild(lblname);
			canvBox.addChild(name);																		
			win.addChild(canvas);
			PopUpManager.addPopUp(win,panel1,true);							
		}	
			win.addChild(imgClose);	
			imgClose.addEventListener(MouseEvent.CLICK, closeFiles);					
	}
	private function closeFiles(evt:Event):void {
		PopUpManager.removePopUp(win);
	}</description>
		<content:encoded><![CDATA[<p>Hello friend</p>
<p>Excellent article, I&#8217;m trying to do something close to this, but I&#8217;m having trouble, I wonder if I can help, here&#8217;s what I&#8217;m doing:<br />
I built a panel only via code and put it in a Canvas also via code and then a vbox and finally put a Canvas (which I want to repeat), I sought data from a php file, but so far I could not do repeat, here&#8217;s the code:</p>
<p>		import mx.core.UIComponentDescriptor;<br />
		import mx.controls.Text;<br />
		import mx.controls.Image;<br />
		import mx.controls.Label;<br />
		import mx.managers.PopUpManager;<br />
		import mx.containers.Panel;<br />
		import mx.core.Repeater;<br />
		import mx.containers.Canvas;<br />
		import mx.containers.VBox;<br />
		import mx.controls.Label;<br />
		public var canvas:Canvas;<br />
		public var vbox:VBox;<br />
		public var rep:Repeater;<br />
		public var win:Panel;<br />
		public var msgErr:Text;<br />
		public var imgClose:Image;<br />
		public var title:Label;</p>
<p>	public function winFiles(evt:Event):void {<br />
		param = new Text();<br />
		param.text = evt.currentTarget.automationName;<br />
		recFiles.send();<br />
	}</p>
<p>			{ param.text}</p>
<p>	private function checkFiles(evt:ResultEvent):void {<br />
			win       = new Panel();<br />
			imgClose = new Image();</p>
<p>			imgClose.source = &#8220;../images/close.png&#8221;;<br />
			imgClose.scaleContent = true;<br />
			imgClose.autoLoad     = true;<br />
			imgClose.toolTip      = &#8220;FECHAR&#8221;;<br />
			imgClose.setStyle(&#8220;right&#8221;,&#8221;5&#8243;);<br />
			imgClose.setStyle(&#8220;top&#8221;,&#8221;5&#8243;);<br />
			imgClose.y = 50;<br />
			imgClose.buttonMode   = true;<br />
		if(evt.result.dados.registros == &#8220;0&#8243;) {<br />
			msgErr    = new Text();<br />
			win.width  = 380;<br />
			win.height = 355;<br />
			win.title = &#8220;:: Anexos (&#8220;+evt.result.dados.registros+&#8221;)&#8221;;<br />
			win.x = (Application.application.width &#8211; win.width) / 2;<br />
			win.y = (Application.application.height &#8211; win.height) / 2;<br />
			win.layout = &#8220;absolute&#8221;;	</p>
<p>			msgErr.text = &#8220;no file found&#8221;;<br />
			msgErr.setStyle(&#8220;left&#8221;,&#8221;5&#8243;);<br />
			msgErr.setStyle(&#8220;top&#8221;,&#8221;5&#8243;);<br />
			msgErr.width  = 180;<br />
			msgErr.height = 50; </p>
<p>			win.addChild(msgErr);<br />
			PopUpManager.addPopUp(win,panel1,true);<br />
		} else {<br />
			canvas  = new Canvas();<br />
			rep     = new Repeater();<br />
			vbox    = new VBox();</p>
<p>			var canvBox:Canvas = new Canvas();<br />
			var lblname:Label  = new Label();<br />
			var name:Label     = new Label();<br />
			var date:Label     = new Label();<br />
			var hour:Label     = new Label();</p>
<p>			win.width = 380;<br />
			win.height = 355;<br />
			win.title = &#8220;:: Anexos (&#8220;+evt.result.dados.registros+&#8221;)&#8221;;<br />
			win.x = (Application.application.width &#8211; win.width) / 2;<br />
			win.y = (Application.application.height &#8211; win.height) / 2;<br />
			win.layout = &#8220;absolute&#8221;;	</p>
<p>			canvas.width = 355;<br />
			canvas.height= 260;<br />
			canvas.setStyle(&#8220;left&#8221;,&#8221;0&#8243;);<br />
			canvas.setStyle(&#8220;top&#8221;,&#8221;50&#8243;);</p>
<p>			vbox.setStyle(&#8220;left&#8221;,&#8221;5&#8243;);<br />
			vbox.setStyle(&#8220;top&#8221;,&#8221;0&#8243;);<br />
			vbox.setStyle(&#8220;verticalGap&#8221;,&#8221;6&#8243;);<br />
			vbox.width  = 335;<br />
			vbox.height = 260;</p>
<p>			canvas.addChild(vbox);	</p>
<p>			canvBox.width = 320;<br />
			canvBox.height= 60;<br />
			canvBox.setStyle(&#8220;backgroundColor&#8221;,&#8221;#ededed&#8221;);<br />
			canvBox.setStyle(&#8220;borderStyle&#8221;,&#8221;solid&#8221;);<br />
			canvBox.setStyle(&#8220;cornerRadius&#8221;,&#8221;5&#8243;);</p>
<p>			vbox.addChild</p>
<p>			var repAnexos:UIComponentDescriptor = new UIComponentDescriptor(canvBox);							</p>
<p>			rep.dateProvider = recAnexos.lastResult.anexos;<br />
			rep.childDescriptors = [repAnexos];<br />
			rep.initializeRepeater(vbox, true);		</p>
<p>			vbox.addChild(rep);</p>
<p>			lblname.text = &#8220;Name:&#8221;;<br />
			lblname.setStyle(&#8220;fontWeight&#8221;,&#8221;bold&#8221;);<br />
			lblname.setStyle(&#8220;left&#8221;,&#8221;0&#8243;);<br />
			lblname.setStyle(&#8220;top&#8221;,&#8221;5&#8243;);<br />
			lblname.width = 100;</p>
<p>			name.setStyle(&#8220;left&#8221;,&#8221;110&#8243;);<br />
			name.setStyle(&#8220;top&#8221;,&#8221;5&#8243;);<br />
			name.width = 100; </p>
<p>			canvBox.addChild(lblname);<br />
			canvBox.addChild(name);<br />
			win.addChild(canvas);<br />
			PopUpManager.addPopUp(win,panel1,true);<br />
		}<br />
			win.addChild(imgClose);<br />
			imgClose.addEventListener(MouseEvent.CLICK, closeFiles);<br />
	}<br />
	private function closeFiles(evt:Event):void {<br />
		PopUpManager.removePopUp(win);<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-3312</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 27 Mar 2009 18:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-3312</guid>
		<description>This was a great example. I&#039;m using the same logic but I&#039;m using the repeater for the text component. For reasons I won&#039;t get into, I was having problems with the line:
descriptorProps.propertiesFactory = radioPropFac;

I decided to replace the function &quot;radioPropFac&quot; with the something like this:

descriptorProps.propertiesFactory = function():Object {
return {
text: itemRepeater.currentItem.label
}}


...that worked like a charm.</description>
		<content:encoded><![CDATA[<p>This was a great example. I&#8217;m using the same logic but I&#8217;m using the repeater for the text component. For reasons I won&#8217;t get into, I was having problems with the line:<br />
descriptorProps.propertiesFactory = radioPropFac;</p>
<p>I decided to replace the function &#8220;radioPropFac&#8221; with the something like this:</p>
<p>descriptorProps.propertiesFactory = function():Object {<br />
return {<br />
text: itemRepeater.currentItem.label<br />
}}</p>
<p>&#8230;that worked like a charm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-3313</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Thu, 05 Feb 2009 07:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-3313</guid>
		<description>From the example above, suppose you had two items you wanted repeated and you want both of those items wrapped in an HBox. I modified the code to include a new UIComponentDescriptor for a TextInput field. How can you put the two UIComponentDescriptor&#039;s in a HBox and tell the repeater to repeat those objects into a Tile.

Do I create another UIComponentDescriptor for the HBox or do a var myHbox:HBox = new HBox()? And then how do I put the Radio button and TextInput into myHbox and get the repeater to repeat that entire process?
&lt;pre class=&quot;code&quot;&gt;
radioRepeater = new Repeater();
radioRepeater.dataProvider = arr;
radioRepeater.childDescriptors = [radioDescriptor, txtInputDescriptor];
radioRepeater.initializeRepeater(myTile, true);
&lt;/pre&gt;

All the things I&#039;ve tried only scattered my objects all over the screen or I had one Huge long horizontal box that scrolled off the screen.

Thanks
Greg</description>
		<content:encoded><![CDATA[<p>From the example above, suppose you had two items you wanted repeated and you want both of those items wrapped in an HBox. I modified the code to include a new UIComponentDescriptor for a TextInput field. How can you put the two UIComponentDescriptor&#8217;s in a HBox and tell the repeater to repeat those objects into a Tile.</p>
<p>Do I create another UIComponentDescriptor for the HBox or do a var myHbox:HBox = new HBox()? And then how do I put the Radio button and TextInput into myHbox and get the repeater to repeat that entire process?</p>
<pre class="code">
radioRepeater = new Repeater();
radioRepeater.dataProvider = arr;
radioRepeater.childDescriptors = [radioDescriptor, txtInputDescriptor];
radioRepeater.initializeRepeater(myTile, true);
</pre>
<p>All the things I&#8217;ve tried only scattered my objects all over the screen or I had one Huge long horizontal box that scrolled off the screen.</p>
<p>Thanks<br />
Greg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-3314</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 19 Nov 2008 22:21:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-3314</guid>
		<description>I have a complicated problem using a Repeater.
There are four new classes: Souce, SourceData, Tactic, TacticData.
Source has a name.
SourceData has a Source (thus a Source name) and quantity.
Tactic has a name.
TacticData has a Tactic (...), selected, dueDate, and done.
(Nevermind why it has to be so split up like that.)
When displayed, a Source has one or more Tactics.
If a tactic is selected, then dueDate and done are enabled.
Now the problems:
1- I&#039;ve gotten this much to for the data supplied at compile time, but how to make the tactic&#039;s field change at runtime?
2- Bonus: if a tactic&#039;s done is checked, then the entire tactic is disabled (selected and dueDate) except done. And then, another tactic of the same name must appear in the same source.
I don&#039;t know if that makes any sense the way I explain it, but here is the source and if I could just get the first problem solved, I&#039;ll be doing alright:
Source.as:
&lt;pre class=&quot;code&quot;&gt;
package
{
	public class Source
	{
		public function Source(){}

		public function get name():String {
			return _name;
		}
		public function set name(value:String):void{
			_name = value;
		}
		private var _name:String = &quot;&quot;;
	}
}
&lt;/pre&gt;

SourceData.as:
&lt;pre class=&quot;code&quot;&gt;
package
{
	public class SourceData
	{
		public function SourceData(source:Source) {
			_source = source;
		}

		public function name():String {
			return _source.name;
		}
		public function get quantity():Number {
			return _quantity;
		}
		public function set	quantity(value:Number):void {
			_quantity = value;
		}
		private var _source:Source = null;
		private var _quantity:Number = 0;
	}
}
&lt;/pre&gt;

Tactic.as:
&lt;pre class=&quot;code&quot;&gt;
package
{
	public class Tactic
	{
		public function Tactic(){}

		public function get name():String {
			return _name;
		}
		public function set name(value:String):void{
			_name = value;
		}
		private var _name:String = &quot;&quot;;
	}
}
&lt;/pre&gt;

TacticData.as:
&lt;pre class=&quot;code&quot;&gt;
package
{
	public class TacticData
	{
		public function TacticData(tactic:Tactic){
			_tactic = tactic;
		}
		//this must be a get (unlike the name function of SourceData)
		//for the label of checkboxes
		//either that or jump thru some hoops when calling name to display text of function result
		public function get name():String {
			return _tactic.name;
		}
		public function get selected():Boolean {
			return _selected;
		}
		public function set selected(value:Boolean):void{
			_selected = value;
		}
		public function get dueDate():Date {
			return _dueDate;
		}
		public function set dueDate(value:Date):void{
			_dueDate = value;
		}
		public function get done():Boolean {
			return _done;
		}
		public function set done(value:Boolean):void{
			_done = value;
		}
		private var _selected:Boolean = false;
		private var _dueDate:Date = new Date();
		private var _done:Boolean = false;
		private var _tactic:Tactic = null;
	}
}
&lt;/pre&gt;

Main.mxml:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;
	creationComplete=&quot;init()&quot;&gt;
&lt;mx:Script&gt;
&lt;![CDATA[
	import mx.controls.CheckBox;
	import mx.controls.Alert;
	import mx.collections.ArrayCollection;

	[Bindable]
	private var sources:ArrayCollection;

	private function init():void{
			var s1:Source = new Source();
			s1.name = &quot;Source 1&quot;
			var s2:Source = new Source();
			s2.name = &quot;Source 2&quot;

			var s1d:SourceData = new SourceData(s1);
			var s2d:SourceData = new SourceData(s2);

			var ta:Tactic = new Tactic();
			ta.name = &quot;tactic A&quot;;
			var tb:Tactic = new Tactic();
			tb.name = &quot;tactic B&quot;;
			var tc:Tactic = new Tactic();
			tc.name = &quot;tactic C&quot;;

			var tad:TacticData = new TacticData(ta);
			var tbd:TacticData = new TacticData(tb);
			tbd.selected=true;
			var tcd:TacticData = new TacticData(tc);

			var a1:Array = new Array(tad,tbd);
			var a2:Array = new Array(tcd);

			sources = new ArrayCollection();
			sources.addItem({name:s1d.name(),quantity:s1d.quantity,tactics:a1});
			sources.addItem({name:s2d.name(),quantity:s2d.quantity,tactics:a2});
	}
	private function checkTactic(event:Event):void{
		var cb:CheckBox = event.currentTarget as CheckBox;
		var t:TacticData = cb.getRepeaterItem() as TacticData;
	}
	private function checkDone(event:Event):void{
		var cb:CheckBox = event.currentTarget as CheckBox;
		var t:TacticData = cb.getRepeaterItem() as TacticData;
		//Alert.show(t.name);
		//now how to get the sourceData associated with this tacticData?
	}
	private function n():void{
		var a:int = 0;
		a++;
	}
]]&gt;
&lt;/mx:Script&gt;
&lt;mx:VBox width=&quot;100%&quot; height=&quot;100%&quot;&gt;
	&lt;mx:HBox horizontalGap=&quot;0&quot; &gt;
		&lt;mx:Label text=&quot;Source&quot; fontSize=&quot;14&quot; fontWeight=&quot;bold&quot; /&gt;
		&lt;mx:Label text=&quot;Quantity&quot; fontSize=&quot;14&quot; fontWeight=&quot;bold&quot; /&gt;
		&lt;mx:Label text=&quot;Tactic&quot; fontSize=&quot;14&quot; fontWeight=&quot;bold&quot; /&gt;
	&lt;/mx:HBox&gt;

	&lt;mx:Grid horizontalScrollPolicy=&quot;auto&quot; verticalScrollPolicy=&quot;auto&quot;
		id=&quot;mainGrid&quot;
		width=&quot;100%&quot; &gt;
		&lt;mx:Repeater id=&quot;repSources&quot; dataProvider=&quot;{this.sources}&quot;
			&gt;
			&lt;mx:GridRow&gt;
				&lt;mx:GridItem colSpan=&quot;2&quot;&gt;
					&lt;mx:HRule width=&quot;100%&quot; /&gt;
				&lt;/mx:GridItem&gt;
			&lt;/mx:GridRow&gt;
			&lt;mx:GridRow&gt;
				&lt;mx:GridItem&gt;
					&lt;mx:Label id=&quot;sourceName&quot; text=&quot;{repSources.currentItem.name}&quot; /&gt;
				&lt;/mx:GridItem&gt;
				&lt;mx:GridItem&gt;
					&lt;mx:TextInput text=&quot;{repSources.currentItem.quantity}&quot; /&gt;
				&lt;/mx:GridItem&gt;
				&lt;mx:GridItem&gt;
				&lt;mx:VBox&gt;
					&lt;mx:Repeater id=&quot;repTactics&quot; dataProvider=&quot;{repSources.currentItem.tactics}&quot;&gt;
					&lt;mx:HBox&gt;
						&lt;mx:CheckBox label=&quot;{repTactics.currentItem.name}&quot;
							selected=&quot;{repTactics.currentItem.selected}&quot;
							change=&quot;checkTactic(event)&quot;/&gt;
						&lt;mx:DateField enabled=&quot;{repTactics.currentItem.selected}&quot;/&gt;
						&lt;mx:CheckBox label=&quot;Done&quot;
							selected=&quot;{repTactics.currentItem.done}&quot;
							enabled=&quot;{repTactics.currentItem.selected}&quot;
							change=&quot;checkDone(event)&quot;/&gt;
					&lt;/mx:HBox&gt;
					&lt;/mx:Repeater&gt;
				&lt;/mx:VBox&gt;
				&lt;/mx:GridItem&gt;
			&lt;/mx:GridRow&gt;
		&lt;/mx:Repeater&gt;
	&lt;/mx:Grid&gt;
&lt;/mx:VBox&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I have a complicated problem using a Repeater.<br />
There are four new classes: Souce, SourceData, Tactic, TacticData.<br />
Source has a name.<br />
SourceData has a Source (thus a Source name) and quantity.<br />
Tactic has a name.<br />
TacticData has a Tactic (&#8230;), selected, dueDate, and done.<br />
(Nevermind why it has to be so split up like that.)<br />
When displayed, a Source has one or more Tactics.<br />
If a tactic is selected, then dueDate and done are enabled.<br />
Now the problems:<br />
1- I&#8217;ve gotten this much to for the data supplied at compile time, but how to make the tactic&#8217;s field change at runtime?<br />
2- Bonus: if a tactic&#8217;s done is checked, then the entire tactic is disabled (selected and dueDate) except done. And then, another tactic of the same name must appear in the same source.<br />
I don&#8217;t know if that makes any sense the way I explain it, but here is the source and if I could just get the first problem solved, I&#8217;ll be doing alright:<br />
Source.as:</p>
<pre class="code">
package
{
	public class Source
	{
		public function Source(){}

		public function get name():String {
			return _name;
		}
		public function set name(value:String):void{
			_name = value;
		}
		private var _name:String = "";
	}
}
</pre>
<p>SourceData.as:</p>
<pre class="code">
package
{
	public class SourceData
	{
		public function SourceData(source:Source) {
			_source = source;
		}

		public function name():String {
			return _source.name;
		}
		public function get quantity():Number {
			return _quantity;
		}
		public function set	quantity(value:Number):void {
			_quantity = value;
		}
		private var _source:Source = null;
		private var _quantity:Number = 0;
	}
}
</pre>
<p>Tactic.as:</p>
<pre class="code">
package
{
	public class Tactic
	{
		public function Tactic(){}

		public function get name():String {
			return _name;
		}
		public function set name(value:String):void{
			_name = value;
		}
		private var _name:String = "";
	}
}
</pre>
<p>TacticData.as:</p>
<pre class="code">
package
{
	public class TacticData
	{
		public function TacticData(tactic:Tactic){
			_tactic = tactic;
		}
		//this must be a get (unlike the name function of SourceData)
		//for the label of checkboxes
		//either that or jump thru some hoops when calling name to display text of function result
		public function get name():String {
			return _tactic.name;
		}
		public function get selected():Boolean {
			return _selected;
		}
		public function set selected(value:Boolean):void{
			_selected = value;
		}
		public function get dueDate():Date {
			return _dueDate;
		}
		public function set dueDate(value:Date):void{
			_dueDate = value;
		}
		public function get done():Boolean {
			return _done;
		}
		public function set done(value:Boolean):void{
			_done = value;
		}
		private var _selected:Boolean = false;
		private var _dueDate:Date = new Date();
		private var _done:Boolean = false;
		private var _tactic:Tactic = null;
	}
}
</pre>
<p>Main.mxml:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
	creationComplete="init()"&gt;
&lt;mx:Script&gt;
&lt;![CDATA[
	import mx.controls.CheckBox;
	import mx.controls.Alert;
	import mx.collections.ArrayCollection;

	[Bindable]
	private var sources:ArrayCollection;

	private function init():void{
			var s1:Source = new Source();
			s1.name = "Source 1"
			var s2:Source = new Source();
			s2.name = "Source 2"

			var s1d:SourceData = new SourceData(s1);
			var s2d:SourceData = new SourceData(s2);

			var ta:Tactic = new Tactic();
			ta.name = "tactic A";
			var tb:Tactic = new Tactic();
			tb.name = "tactic B";
			var tc:Tactic = new Tactic();
			tc.name = "tactic C";

			var tad:TacticData = new TacticData(ta);
			var tbd:TacticData = new TacticData(tb);
			tbd.selected=true;
			var tcd:TacticData = new TacticData(tc);

			var a1:Array = new Array(tad,tbd);
			var a2:Array = new Array(tcd);

			sources = new ArrayCollection();
			sources.addItem({name:s1d.name(),quantity:s1d.quantity,tactics:a1});
			sources.addItem({name:s2d.name(),quantity:s2d.quantity,tactics:a2});
	}
	private function checkTactic(event:Event):void{
		var cb:CheckBox = event.currentTarget as CheckBox;
		var t:TacticData = cb.getRepeaterItem() as TacticData;
	}
	private function checkDone(event:Event):void{
		var cb:CheckBox = event.currentTarget as CheckBox;
		var t:TacticData = cb.getRepeaterItem() as TacticData;
		//Alert.show(t.name);
		//now how to get the sourceData associated with this tacticData?
	}
	private function n():void{
		var a:int = 0;
		a++;
	}
]]&gt;
&lt;/mx:Script&gt;
&lt;mx:VBox width="100%" height="100%"&gt;
	&lt;mx:HBox horizontalGap="0" &gt;
		&lt;mx:Label text="Source" fontSize="14" fontWeight="bold" /&gt;
		&lt;mx:Label text="Quantity" fontSize="14" fontWeight="bold" /&gt;
		&lt;mx:Label text="Tactic" fontSize="14" fontWeight="bold" /&gt;
	&lt;/mx:HBox&gt;

	&lt;mx:Grid horizontalScrollPolicy="auto" verticalScrollPolicy="auto"
		id="mainGrid"
		width="100%" &gt;
		&lt;mx:Repeater id="repSources" dataProvider="{this.sources}"
			&gt;
			&lt;mx:GridRow&gt;
				&lt;mx:GridItem colSpan="2"&gt;
					&lt;mx:HRule width="100%" /&gt;
				&lt;/mx:GridItem&gt;
			&lt;/mx:GridRow&gt;
			&lt;mx:GridRow&gt;
				&lt;mx:GridItem&gt;
					&lt;mx:Label id="sourceName" text="{repSources.currentItem.name}" /&gt;
				&lt;/mx:GridItem&gt;
				&lt;mx:GridItem&gt;
					&lt;mx:TextInput text="{repSources.currentItem.quantity}" /&gt;
				&lt;/mx:GridItem&gt;
				&lt;mx:GridItem&gt;
				&lt;mx:VBox&gt;
					&lt;mx:Repeater id="repTactics" dataProvider="{repSources.currentItem.tactics}"&gt;
					&lt;mx:HBox&gt;
						&lt;mx:CheckBox label="{repTactics.currentItem.name}"
							selected="{repTactics.currentItem.selected}"
							change="checkTactic(event)"/&gt;
						&lt;mx:DateField enabled="{repTactics.currentItem.selected}"/&gt;
						&lt;mx:CheckBox label="Done"
							selected="{repTactics.currentItem.done}"
							enabled="{repTactics.currentItem.selected}"
							change="checkDone(event)"/&gt;
					&lt;/mx:HBox&gt;
					&lt;/mx:Repeater&gt;
				&lt;/mx:VBox&gt;
				&lt;/mx:GridItem&gt;
			&lt;/mx:GridRow&gt;
		&lt;/mx:Repeater&gt;
	&lt;/mx:Grid&gt;
&lt;/mx:VBox&gt;

&lt;/mx:Application&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-3316</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 28 Oct 2008 05:50:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-3316</guid>
		<description>MArcio,

The example at the top of the page shows how to create a Repeater using ActionScript.

Peter</description>
		<content:encoded><![CDATA[<p>MArcio,</p>
<p>The example at the top of the page shows how to create a Repeater using ActionScript.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MArcio</title>
		<link>http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/comment-page-1/#comment-3315</link>
		<dc:creator>MArcio</dc:creator>
		<pubDate>Mon, 27 Oct 2008 21:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/28/displaying-radiobutton-controls-using-the-repeater-in-flex-redux/#comment-3315</guid>
		<description>How do Repeater in ActionScript?

I am using this way!

But only runs the first record!


&lt;pre class=&quot;code&quot;&gt;
private function Repeat (): void (

var repeater: Repeater = new Repeater ();
repeater.dataProvider = dataprovider_Controller.item;

trace ( &quot;repeater.currentItem.image:&quot; + repeater.currentItem.image);
var image: Image = new Image ();

image.setStyle ( &quot;HorizontalAlign&quot;, &quot;left&quot;);
image.source = repeater.currentItem.image;
image.id = &quot;image&quot;;
trace ( &quot;image.source:&quot; + image.source);

)
&lt;/pre&gt;

I think I have to quit Repeat to make the loop of
records, but how would this in ActionScript?</description>
		<content:encoded><![CDATA[<p>How do Repeater in ActionScript?</p>
<p>I am using this way!</p>
<p>But only runs the first record!</p>
<pre class="code">
private function Repeat (): void (

var repeater: Repeater = new Repeater ();
repeater.dataProvider = dataprovider_Controller.item;

trace ( "repeater.currentItem.image:" + repeater.currentItem.image);
var image: Image = new Image ();

image.setStyle ( "HorizontalAlign", "left");
image.source = repeater.currentItem.image;
image.id = "image";
trace ( "image.source:" + image.source);

)
</pre>
<p>I think I have to quit Repeat to make the loop of<br />
records, but how would this in ActionScript?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

