Solved

What is repeater?

Posted on 2011-02-21
4
285 Views
Last Modified: 2012-05-11
What is repeater and provide me with some sample code?
0
Comment
Question by:naveenm_006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 34941030
0
 
LVL 8

Expert Comment

by:jimsweb
ID: 34941031
repeater is nothing but  a loop function in mxml. Suppose you ahve given a dataprovider to repeater, and the repeater can iterate over it and   display the MXML components within the repeater.

I have found a good tutorial on this here. Hope it helps.
http://www.nbilyk.com/flex-repeater-tips
0
 

Accepted Solution

by:
jayasainaths earned 50 total points
ID: 34964329
Hi Naveen,

Repeater is a Class that is used to create multiple instances of a single component depending on the data provided to it...

This is mainly used when the data provider is a dynamically varying XML coming from an external server.

I'm here listing a simple example that well illustrates about the Repeater Class


//CODE

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" xmlns:local="*">
      
      
      <mx:Script>
            <![CDATA[
                  
                  public function call(str:String):void
                  {
                        l.text = str;
                  }
            ]]>
      </mx:Script>
      
      <mx:ArrayCollection id="arr">
            <mx:String>1</mx:String>
            <mx:String>2</mx:String>
            <mx:String>3</mx:String>
            <mx:String>4</mx:String>
            <mx:String>5</mx:String>
            <mx:String>6</mx:String>
            <mx:String>7</mx:String>
            <mx:String>8</mx:String>
            <mx:String>9</mx:String>
      </mx:ArrayCollection>
      
      <mx:Label id="l" x="716" y="150" fontSize="32" color="White"/>
      <mx:Tile width="200" x="490.5" y="150" height="300">
            <mx:Repeater id="rp"  dataProvider="{arr}">
                  <mx:Button label="{rp.currentItem}" width="50" height="50" click="call(event.target.getRepeaterItem())"/>
            </mx:Repeater>
      </mx:Tile>
</mx:Application>


Please Comment...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Air application in online mode and offline mode 4 447
AdvancedDataGrid 5 529
html into FLEX 3 282
Flex mobile local storage. 2 691
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Deploying our service is a grudge match between customer benefits and customer pain. In one corner, rolling out fixes (yay!) and delivering new features (double yay!). In the other corner, training on new features (boo – sounds like work), and chan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question