How to group UI components into an array in MXML

Hi all,
I'm new in Flex. I want to group UI components into an array
in MXML, but I don't know how to do so. Pseudo code looks like
following:
<mx:Text id="arrayItems[]"/>
<mx:Text id="arrayItems[]"/>
<mx:Text id="arrayItems[]"/>
In AS3, I would like to execute a method as follows:
<mx:Script>
<![CDATA[
private function setTextFields():void {
for (var i:int = 0; i < arrayItems.length; i++) {
arrayItems[ i ].text = "Text " + i;
]]>
</mx:Script>
Anybody please help me to correct the MXML code above.
Thanks alot,
KhoaNgo

The easiest way is to use a repeater.
HTH;
Amy
"KhoaNgo" <[email protected]> wrote in
message
news:gpla74$78u$[email protected]..
> Hi all,
>
> I'm new in Flex. I want to group UI components into an
array in MXML, but
> I
> don't know how to do so. Pseudo code looks like
following:
>
> <mx:Text id="arrayItems[]"/>
> <mx:Text id="arrayItems[]"/>
> <mx:Text id="arrayItems[]"/>
>
> In AS3, I would like to execute a method as follows:
>
> <mx:Script>
> <![CDATA[
> private function setTextFields():void {
> for (var i:int = 0; i < arrayItems.length; i++) {
> arrayItems
.text = "Text " + i;
> }
> }
> ]]>
> </mx:Script>
>
> Anybody please help me to correct the MXML code above.
> Thanks alot,
> KhoaNgo
>

Similar Messages

  • How to move multiple components into a Tab Component and still keep layout?

    I have created a Combination Chart with multiple combo boxes and a slider on my Xcelsius Canvas.  Now, I realize that I want to put all of this into a Tab Set Component.  How can I move everything into this new Tab Component without messing up all the layout and alignment I have done on all my components already?  I tried shift-selecting everything and doing a drag --> drop into the Tab Canvas but they just all stack on top of each other.
    Can this be done?  Would it be wiser to start a new Xcelsius document, place a Tab Set Component on the canvas and then copy --> paste from the original document into the new one? I'm reluctant to do this though (even within the same document) because it forces all components to be renamed back to their defaults such as Chart 1, Combo Box 1, etc etc.
    Edit:
    Bolded my biggest concern on this topic, can components be copy/pasted or cut/pasted and still retain their original name?

    i think this scenario would work fine for you
    choose all the components you want to move from the "Object Browser"
    you can show the Object Browser from the View Menu
    after you select them all, you can drag them to your Tab component
    or you can make them as a group, so it will be easy to move them as the same layout they have.
    to make them as one group
    select them all, go to format menu, and select Group
    now you have all of them as one item, move them to the tab and then you can ungroup them the same way
    good luck
    Amr

  • How to pass java arraylist into javascript arrays

    Hi, i have declare an arraylist
    ArrayList list1 = new ArrayList();Inside the arraylist, there are elements. Now, i wan to pass the elements in the java arraylist into javascript arrays but i encounter javascript errors.
    This is how i code.
    var arr1 = new Array();
    <%
    for ( int x =0; x<list1.size(); x++)
    %>
         arr1[<%=x%>] = <%=(String)list1.get(x)%>;
    <%
    %>how do i solve this problem?
    Thanks for the guidance in advance

    JTech wrote:
    Hi,
    Use Quotes around string value ( arr1[indexposition] = "stringvalue";), when assign to javascript array as below.
    arr1[<%=x%>] = "<%=(String)list1.get(x)%>"; Regards,
    Ram.Hi Ram,
    How about using arr1 = <%=list.toArray()%> ??? Is this possible? I tried it but was not working on my IDE. Do you have any solutions for this??
    Regards,
    Thiagu

  • How to import webdynpro components into EP

    Hi Experts,
      I have successfully created one webDynpro Application.
      now I tried to import the webdynpro components into EP
    what are all the steps are required?
    How to do that?
    Regards
    P.Manivannan.

    Hi,
    Please check if <a href="http://help.sap.com/saphelp_nw70/helpdata/en/b7/ca934257a5c96ae10000000a155106/frameset.htm">this</a> answers your question.
    Ashutosh

  • How GL groups AP transactions into Journals

    Hi,
    When I transfer AP transactions like validated invoices and payments how they get grouped into Journals in GL. Is it one Journal per invoice/payment or invoice lines can be distributed to multiple journals? What is the criteria transfer program or GL uses to group invoice lines or payment lines to Journals?
    When I checked Vision database, I found a invoice lines ( distributions ) were seen in multiple journals, I also noticed one Journal made of just one invoice distributions. I also seen one Journal has multiple invoices distributions? I am confused and wondering if there might be some setup's/options causing this haphazard grouping. Any help in understanding this process appreciated
    Thanks,

    Hello.
    Run the following query to see what Categories are coming from Payables.
    select distinct je_category
    from gl_je_headers
    where je_source = 'Payables'
    If you enter an invoice and validate it, when you post it to GL, the invoice header and all lines will be in the same journal. Later, if you make some modification on it (cancel and re-enter a distribution, for example) those modification will go into GL in a different Journal. The same thing happens with payments.
    Hope this helps.
    Octavio

  • SRM SC Migration - How to group SC Items into PO based on a custom made fld

    When migrating Shopping Carts in SRM items are grouped into PO based on Supplier (LIFNR).
    ITEM data in SC has a new, custom made field BE_NR that contains PO numbers from the legacy system.
    Customer wants that PO's are created out of the SC based on the value in BE_NR. They want that items with the same BR_NR are grouped into same PO.
    How can I group all the items with the same BE_NR in one PO?

    Hello,
    You can try the following badis:
    BBP_BS_GROUP_BE - for classic scenario
    BBP_GROUP_LOC_PO - for extended classic scenario
    Regards,
    Ricardo

  • How to alternate data storage into 2 arrays with an analog square wave input? (seems that the retriggera​ble function is not supported by my PXI card)

    Hi!  
    I'm trying to have an analog square wave input determine where data gathered from a second analog input channel is stored.  I want data to be stored to one array during the high signal period of the square wave and data to be store to another array during the low signal period of the square wave.  The square wave I'm using is of constant frequency (8.3 Hz).  I believe I need to use an analog input wave as opposed to a onboard clock or other timing mechanism because my square wave is also being used to modify the input going into my experimental setup.  Thus the data storage needs to be correlated to the timing of the data modification in the experiment.  I tried to use the retriggerable property node function, but receive error 200452, which I think means that my PXI card (6115) can't support this retriggerable function.  So I'm looking for other ways to accomplish alternating data storage in response to an incoming analog square wave.  Any help would be GREATLY appreciated... Thanks!  (I'm also quite new with LabView so toddler-type explanations would probably be most useful  )
    -Shari
    (LabView version 8.6)
    Attachments:
    Pulsed_Acq_Switch_Simplified.vi ‏47 KB

    Hello Shari,
          I am looking at your situation and it seems very intriguing.  after downloading your file I have a couple questions to ask if you don't mind answering.
          Currently in your program you are only taking one sample of data at a time,  this could lead to uneven sampling.  Would you like to sample at a consistent rate  (say 10 Kilosamples of data a second?)  if so what type of card are you using?
          Also,  Do you want your data to be in a 2-D array of data?
    Best Wishes,
    Daniel

  • How is grouping HR tables into Payroll, Administration,

    Hi,
    Please let me know how is groupings of the tables in HR. I can see that there is large amount of tables in HR. I have searched like HR* , PA* , PY* .
    How the reports programs are grouped.
    Please suggest me documents to understand HR abap.
    Thanks,
    Senthil

    Look for RH, HR,S_AHR*
    some of the Reports you will find with S_PH, PT,
    Amandeep

  • How to group measurement data into different groups using TDMs

    Hi, frnds!
    I have designed a labview program for measuring the power current characteristics of a laser diode. I want to save the current and power arrays measured at different temperatures in different groups. I tried to implement this but I was not successful. The current and power measurements at different temperatures are being saved only in the first group and the rest are being empty! Please help me save the measurements in different temperature groups.
    I need this urgently!
    Thanks in advance!
    Kumar

    Perhaps a snippet of the code you are using would help. When you write to the TDMS file with the low level functions, you just need to specify the separate group names. Have you read over  the NI TDMS File Format, Introduction to LabVIEW TDM Streaming VIs, and Writing TDM and TDMS files articles? Have you tried any examples out of the Example Finder?
    As a basic example:
    Certified LabVIEW Developer

  • How to group Similar Rows into One Row  ?? Suggestions??

    Hi there , I am having a problem in my project you see I have 2 dimensions in my cube called Username and Symbols and a measure called M1.
    You see in the Symbol dimension there is repeated data in multiple rows such as the following
    Pepsi
    Pepsi
    Pepsi
    CocalCola
    Now when i display the dimension Username with the dimension Symbol using the Measure value M1. I get something like this
    UserName A
    Pepsi---- 10
    Pepsi---- 10
    Pepsi---- 10
    CoacalCola--- 20
    Now in the above table UserNameA represents a member of Username Dimension and cold drinks represent members of the Symbol Dimension
    and the numarical value represents the measure M1.
    I want it to appear something like this
    UserName A
    Pepsi 30 (Notice The measures of Pepsi have been added)
    CocalCola 20
    Any idea on how i can accomplish this or tip i would be really thankful

    Hi
    Use the aggregator operator in mapping. You can use the SUM function on the columns you wish to sum for example, and group by the other columns.
    Cheers
    David

  • How to Group Few Rows into One Rows In Query

    Dear All,
    I've use the "Group By" syntax in my query, but when the result display, it still show few rows instead of one row.
    Current Results
    item         Jan       Feb        Mar
    A              10          0           20
    A              10          0            0
    A               0           5            0
    B               0           0           10
    Desire Result
    item        Jan         Feb         Mar
    A             20           5           20
    B             0             0           10
    My query is:
    /*select from [dbo].[oinv] T0 */
    declare @customer varchar (200)
    /* where */
    set @customer = /* T0.Cardname */ '[%A]'
    /*select from [dbo].[inv1] T1 */
    declare @fromdate as datetime
    /* where */
    set @fromdate = /* T1.DOCDATE */ '[%1]'
    /*select from [dbo].[inv1] T2 */
    declare @tilldate as datetime
    /* where */
    set @tilldate = /* T1.DOCDATE */ '[%2]'
    SELECT inv1.ITEMCODE, oitm.itemname,
    CASE WHEN MONTH(INV1.DOCDATE) = 1 THEN SUM(QUANTITY) ELSE NULL END AS 'JAN',
    CASE WHEN MONTH(INV1.DOCDATE) = 2 THEN SUM(QUANTITY) ELSE NULL END AS 'FEB',
    CASE WHEN MONTH(INV1.DOCDATE) = 3 THEN SUM(QUANTITY) ELSE NULL END AS 'MAR',
    CASE WHEN MONTH(INV1.DOCDATE) = 4 THEN SUM(QUANTITY) ELSE NULL END AS 'APR',
    CASE WHEN MONTH(INV1.DOCDATE) = 5 THEN SUM(QUANTITY) ELSE NULL END AS 'MAY',
    CASE WHEN MONTH(INV1.DOCDATE) = 6 THEN SUM(QUANTITY) ELSE NULL END AS 'JUN',
    CASE WHEN MONTH(INV1.DOCDATE) = 7 THEN SUM(QUANTITY) ELSE NULL END AS 'JUL',
    CASE WHEN MONTH(INV1.DOCDATE) = 8 THEN SUM(QUANTITY) ELSE NULL END AS 'AUG',
    CASE WHEN MONTH(INV1.DOCDATE) = 9 THEN SUM(QUANTITY) ELSE NULL END AS 'SEPT',
    CASE WHEN MONTH(INV1.DOCDATE) = 10 THEN SUM(QUANTITY) ELSE NULL END AS 'OCT',
    CASE WHEN MONTH(INV1.DOCDATE) = 11 THEN SUM(QUANTITY) ELSE NULL END AS 'NOV',
    CASE WHEN MONTH(INV1.DOCDATE) = 12 THEN SUM(QUANTITY) ELSE NULL END AS 'DEC'
    FROM OINV inner join inv1 on oinv.DocEntry = inv1.DocEntry INNER JOIN OITM on inv1.itemcode = oitm.itemcode
    WHERE oinv.cardname =@customer AND inv1.DOCDATE >=@fromdate AND inv1.DOCDATE <=@tilldate
    GROUP BY inv1.ITEMCODE, oitm.itemname, inv1.docdate
    I've tried to write in "Select Syntax" too, but still get the same result. I'm really have no idea what's wrong with my query. Thanks for all your help!
    Cheers,
    Serene

    Hi Serene,
    in last query I forgot in subquery condition for customer (the sum was for all customers).
    Try this:
    SELECT distinct inv1.ITEMCODE, oitm.itemname,
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock) where  xx.docentry = x.docentry and xx.cardname = @customer and inv1.itemcode = x.itemcode and month(x.docdate ) = 1 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'JAN',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where  xx.docentry = x.docentry and xx.cardname = @customer and inv1.itemcode = x.itemcode and month(x.docdate ) = 2 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'FEB',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where  xx.docentry = x.docentry and xx.cardname = @customer and inv1.itemcode = x.itemcode and month(x.docdate ) = 3 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'MAR',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 4 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'APR',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 5 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'MAY',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 6 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'JUN',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 7 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'JUL',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 8 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'AUG',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 9 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'SEP',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 10 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'OCT',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and  inv1.itemcode = x.itemcode and month(x.docdate ) = 11 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'NOV',
    (select coalesce(sum(x.quantity),0) from inv1 x with(nolock), oinv xx with(nolock)  where xx.docentry = x.docentry and xx.cardname = @customer and inv1.itemcode = x.itemcode and month(x.docdate ) = 12 and x.DOCDATE >=@fromdate AND x.DOCDATE <=@tilldate) as 'DEC'
    FROM OINV
    inner join inv1 on oinv.DocEntry = inv1.DocEntry
    INNER JOIN OITM on inv1.itemcode = oitm.itemcode
    WHERE oinv.cardname =@customer and quantity > 0
    AND inv1.DOCDATE >=@fromdate AND inv1.DOCDATE <=@tilldate

  • Itune - How to Group Different Artist into Same Ablum

    I have a collection type Album - has all different artist
    I would like to the songs to show up in an single cover flow
    so when i go to cover flow view - there is only 1 album not multiple
    right now
    i have 7 album in cover flow for that collection -they all have same album name but different artist
    could you please help me and give example while explaining it
    i read other posts. but the explanation isn't clear
    thx a million
    love janet

    You need to select the 1st song, then right-clock on it. Select "Get Info" from the dropdown list. On the Info window that opens, select the "Information" tab. In the bottom right corner, you'll see a checkbox named "part of a compilation".
    Left-click to put a checkmark in that box. Next, click on the "NEXT" button (at the bottom-center of the window), and add the checkmark to the next song in the list. Repeat that process for all songs in the compilation album.
    Unfortunately, I haven't found a way to select that checkbox for multiple songs at once... You have to manually do it to each song. (I have lots of compilation albums, and it took a LONG TIME to fix all the info.
    So far, I'm pretty unimpressed with the "Genres" that iTunes created when it imported my 180GB music collection. It's taken a couple of weeks to change all 38,000 songs into the Genre folders I have things sorted into in my computer.

  • How to insert new value into an array

    I have an already declared array (including the size) and want to write a method for inserting a new value. Do I have to re-declare the array to the new size? ie old size + 1, then add the new value or is there a java method for this. I can't find one.
    Thanks in advance....
    Mike

    Hi,
    there is no method for that. Look up class Vector. That class implements automatic growing of the Vector.
    Phil

  • How to group arts into a group

    I look in AIArtSuite but could not figure out how to group multiple arts into a group.
    Please help.

    Thanks very much, this is how I ended up doing:
    There are 2 arts to be grouped: image (kPlacedArt) and path (kPathArt).
    I created a new art of type kGroupArt and place the other two inside it.
        sAIArt->NewArt(kGroupArt, kPlaceAboveAll, nil, &group);
        sAIArt->ReorderArt(image, kPlaceInsideOnTop, group);
        sAIArt->ReorderArt(path, kPlaceInsideOnTop, group);

  • How to convert an array of bits into an array of bytes?

    If I have an array of 1s and 0s, how can I pack them
    into an array of bytes (8 bits)?
    Thanks.

    NI recommends to get rid of 4.x mode (Quote from the help file: "National Instruments recommends reworking any application that uses the Convert 4.x Data mode as a long term solution."). For this reason, I have attached an alternative example to give you some ideas.
    (The previous example (using 4.x type cast) is actually slightly flawed, because for some reason it only produces even sized output arrays (why???) so you would need to trim the resulting array as a function of the input array size.)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    OnesAndZeroesU8v2.vi ‏43 KB

Maybe you are looking for

  • ITunes album art screensaver no longer works

    My screensaver suddenly no longer displays the iTunes album artwork library. Instead it's a black screen saying "Your iTunes Library does not contain any songs with artwork. What happened here? Album artwork shows up fine in iTunes and the screensave

  • Which is Better? Mac or PC?

    Which is Better? Intel iMac   Mac OS X (10.4.5)  

  • Illustrator CS5 15.0.2 on Mac OS X 10.6.4 (polish version) doesn't open

    my Illustrator which I have purchased with Master Collection CS5 (polish version) doesn't work at all. I just can't open this application. There is some failure, which makes it impossible. I have called my local support and after I have tried all the

  • Spry Tabbed Panels

    When trying to insert a Spry Tabbed Panels I get a Java Script error. It doesn't allow me to select the parent of the Tabbed Panels for easy addition of additional panels. This has been an ongoing problem. I've tried reloading DreamWeaver but that di

  • Standby database with different os

    Hi, can anyone help me, if i want build standby database, my primary database using Oracle on Sun Solaris v880, can i use intel based linux or intel based solaris as standby database (hardware cheaper than sun unix) ? if can how to configure or insta