Nested arrays

I have a table of "panels" and a table of "loops". Each panel
(category) can have many loops (subcategories). The tables are
related by panelid. Each loop has a corresponding panelid. How do I
create a nested array (an array of loops
within each panel object of my array of panels)?
I need help creating this nested array in my CFC.
On the front end, I'm using remote object in Flex to populate
an ArrayCollection. This arraycollection will feed nested repeaters
(a outer repeater that builds an accordion canvas for each panel
and an inner repeater of buttons for the loops within that panel).
If you can help me on the CFC side, that would be great. If
you also know how to reference that array in Flex to build nested
repeaters...bonus.
Thanks,
Don

I have a table of "panels" and a table of "loops". Each panel
(category) can have many loops (subcategories). The tables are
related by panelid. Each loop has a corresponding panelid. How do I
create a nested array (an array of loops
within each panel object of my array of panels)?
I need help creating this nested array in my CFC.
On the front end, I'm using remote object in Flex to populate
an ArrayCollection. This arraycollection will feed nested repeaters
(a outer repeater that builds an accordion canvas for each panel
and an inner repeater of buttons for the loops within that panel).
If you can help me on the CFC side, that would be great. If
you also know how to reference that array in Flex to build nested
repeaters...bonus.
Thanks,
Don

Similar Messages

  • Access nested array element using this.name - is it possible?

    Hi
    I've got a nested array containing a series of 2 element arrays containing an object name, and text related to that object.
    I've set it up like this:
    public var names:Array = [["instance name 1", "text for first object"],["instance name 2", "text for second object"], ...]];
    What I'm trying to do is to have the text related to the object appear in a text box when the object is moved.
    This is all set up within a class containing code for the drag and drop functions.
    If I set the text box to show a specific element, such as:
    MovieClip(parent).text_box.text= names[2][1];
    it works fine. But I can't get it to create the value for the first bracket from the this.name attribute.
    I had it working for 2 arrays - one with the name and another with the text where the code was;
    MovieClip(parent).text_box.text= texts[names.indexOf(this.name)];  (arrays named 'names' and 'texts', text box named 'text_box')
    I'm hoping there's something similar that I can do for the nested array, but everything I try gives me the #1010 error - term undefined.
    Is there an easy way to sort this out - or am I better sticking with the 2 array version?
    (BTW this is my first go at using arrays)
    Thanks

    Why not use an Object for this, like:
    var oTexts:Object = {
                                  "clipname1":"text for clip 1",
                                  "clipname2":"text for clip 2",
                                  "clipname3":"text for clip 3",
    and then jsut use sometihing like this
    var txt:String = MovieClip(parent).oTexts[this.name];
    etc. ..

  • How to find and modify  item in a nested array collection?

    Hi,
    would anybody know how to find and modify item in a nested
    array collection:
    private var ac:ArrayCollection = new ArrayCollection([
    {id:1,name:"A",children:[{id:4,name:"AA",children:[{id:8,name:"AAA"}]},{id:5,name:"AB"}]} ,
    {id:2,name:"B",children:[{id:6,name:"BA"},{id:7,name:"BB"}]},
    {id:3,name:"C"}
    Let's say I've got object {id:8, name:"X"} , how could I find
    item in a collection with the correspoding id property, get handle
    on it and update the name property of that object?
    I'm trying to use this as a dataprovider for a tree populated
    via CF and remoting....
    Thanks a lot for help!

    Thanks a lot for your help!
    In the meantime I've come up with a recursive version of the
    code.
    This works and replaces the item on any level deep:
    private function findInAC(ac:ArrayCollection):void{
    var iMatchValue:uint=8;
    for(var i:uint=0; i<ac.length; i++){
    if(ac
    .id == iMatchValue){
    ac.name = "NEW NAME";
    break;
    if(ac
    .children !=undefined){
    findInAC( new ArrayCollection(ac.children));
    However, if I use the array collection as a dataprovider for
    a tree and change it, the tree doesn't update, unless I collapse
    and reopen it.
    Any ideas how to fix it ?

  • Complex query - improve performance with nested arrays, bulk insert....?

    Hello, I have an extremely complicated query, that has a structure similar to:
    Overall Query
    ---SubQueryA
    -------SubQueryB
    ---SubQueryB
    ---SubQueryC
    -------SubQueryA
    The subqueries themselves are slow, and having to run them multiple times is much too slow! Ideally, I would be able to run each subquery once, and then use the results. I cannot use standard oracle tables, and i would need to keep the result of the subqueries in memory.
    I was thinking I write a pl/sql script that did the subqueries at the beginning and stored the results in memory. Then in the overall query, I could loop through my results in memory, and join the results of the various subqueries to one another.
    some questions:
    -what is the best data structure to use? I've been looking around and there are nested arrays, and there's the bulk insert functionality, but I'm not sure what is the best to you
    -the advantage of the method I'm suggesting is that I only have to do each subquery once. But, when I start joining the results of the subquery to one another, will I take a performance hit? will Oracle not be able to optimize the joins?
    thanks in advance!
    Coop

    I cannot use standard oracle tablesWhat does this mean? If you have subqueries, i assume you have tables to drive them? You're in an Oracle forum, so i assume the tables are Oracle tables.
    If so, you can look into the WITH clause, it can 'cache' the query results for you and reuse them multiple times, also helpful in making large queries with many subqueries more readable.

  • Nest array in a custom component

    Hello and thanks in advance,
    I am building a custom datagrid component name custDG. It is a canvas containing the DG and some other visuals. So the actual component is based on canvas and has a DataGrid nested.
    I have also build a custom class name config based on Array to hold the DG column information
    AND a custom object class name col to hold each column information inside the config array class...
    My question is how to make it possible for user to nest the array and columns inside the custom component when adds it to an application. For example:
    <mike:custDG... >
         <mike:config>
              <mike:col.../>
              <mike:col.../>
              <mike:col.../>
         </mike:config>
    </mike:custDG... >
    Want to make something similar to the columns-datagridcolumn thingie but with custom classes in a custom component.
    Anyone plz?
    Thanks

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • SUP Nested Array Problem in REST Response while Creating MBO

    I am using SUP 2.0 to build MBOs from a rest web service which sends me a list of profiles in which each profile has a list of industries associated with him that mean my resultset contains an array of industries in the XML response for each of the profile.
    What SUP is doing when I am trying to build MBOs and execute them, it is returning me duplicate rows as the MBO is not able to hold complex object like array or list. Each profile is repeated n times if the profile has got n industries,
    How to handle this kind of response in SUP ?
    My Profile structure looks like
    Profile {
      STRING city;
      STRING name;
      STRING profileID;
      STRING[] industries;

    Okay I am defining it more elaborately.
    suppose from a web service u get a response which contains a list of profiles as its result. Now each profile has got a list of industries as well. But MBO in SUP don't support complex data type like array of objects. Now when i try to preview, if i had 2 profiles in the resultset and say 1st profile 'a' has got 3 industries and 2nd profile 'b' has got 2 industries so now my resultset contains 5 rows like
    Name           City            ProfileID           Industries
    a                   c1              p01                   i1
    a                   c1              p01                   i2
    a                   c1              p01                   i3
    b                   c2              p03                   i4
    b                   c2              p03                   i7
    How to handle it in a better way, Can I use SUPObjectList somehow to hold list of Industries for each profile in the resultset without getting repeated entries.
    Thanks

  • KVO with nested arrays?

    I'm working on an app with the typical UITableView displaying rows grouped into sections. I have an NSMutableArray of Section objects, each of which has an array of Entry objects. Manual KVO is working for adding and removing Section objects. I can use a key path of "sections" and everything works as expected.
    I'd like to use KVO for operations on the entries array in each Section object so I can add/remove table rows as entries are added/removed in each Section. Using a key path of "sections.entries" doesn't work. I get an NSInvalidArgumentException with [<NSCFArray 0x104fbb0> addObserver:forKeyPath:options:context:] is not supported. Key path: entries in the console. After a bit of thought, the error makes sense: the sections property is an NSMutableArray, which of course doesn't have an entries property.
    How do I do this? Is there a better way that I'm missing?

    Well, after a bit of fiddling I found a solution. I'm not sure if it's the right solution, but it appears to work.
    I had been assuming that the key path had to be somehow related to actual properties of objects. But, on a whim, I made up a key path that corresponded to nothing, and it worked. I can issue and observe events on my fake key path just fine.

  • Issue with Mulidimensional Nested Table

    Hi All,
    I am studing Multidimensional Nested table and have the below code:
    DECLARE
      TYPE table_type1 IS TABLE OF INTEGER;
      TYPE table_type2 IS TABLE OF TABLE_TYPE1;
      table_tab1 table_type1 := table_type1();
      table_tab2 table_type2 := table_type2(table_tab1);
    BEGIN
      FOR i IN 1 .. 2
      LOOP
        table_tab2.extend;
        table_tab2(i) := table_type1();
        FOR j IN 1 .. 3
        LOOP
          IF i = 1
          THEN
            table_tab1.extend;
            table_tab1(j) := j;
          ELSE
            table_tab1.extend;
            table_tab1(j) := 4 - j;
          END IF;
            table_tab2.extend;
          table_tab2(i)(j) := table_tab1(j);
          DBMS_OUTPUT.PUT_LINE('table_tab2(' || i || ')(' || j || '): ' ||
                               table_tab2(i) (j));
        END LOOP;
      END LOOP;
    exception
      when others then
        dbms_output.put_line(sqlerrm);
    END;
    This code is working fine as of now.But,If i comment below code(table_tab2 is also extended latter):
    table_tab2.extend; 
        table_tab2(i) := table_type1();
    then it gives me error 'Subscription Beyond count'.
    I would like to know why i need to extend table_tab2 twice?
    Thanks!

    This code is working fine as of now
    No, it isn't. Make sure you have serveroutput on. If you do, you get this as script output (I am using SQL Developer):
    anonymous block completed
    ...meaning no exception was raised to client, because you trapped it, but the DBMS Output window gives:
    ORA-06533: Subscript beyond count
    ...with no indication of which line, because you suppressed it (why?). If you drop the worse than useless exception handler, you get:
    ORA-06533: Subscript beyond count
    ORA-06512: at line 22
    06533. 00000 -  "Subscript beyond count"
    *Cause:    An in-limit subscript was greater than the count of a varray
               or too large for a nested table.
    *Action:   Check the program logic and explicitly extend if necessary.
    A bit more helpful, yes? and with less code. Here is a revised block that writes the loop variable product to the nested array, with its output, initialising and extending correctly:
    DECLARE
      TYPE table_type1 IS   TABLE OF INTEGER;
      TYPE table_type2 IS   TABLE OF table_type1;
      table_tab1            table_type1;
      table_tab2            table_type2 := table_type2();
    BEGIN
      FOR i IN 1..2 LOOP
        table_tab1 := table_type1();
        FOR j IN 1..3 LOOP
          table_tab1.extend;
          table_tab1(j) := i * j;
        END LOOP;
        table_tab2.extend;
        table_tab2(i) := table_tab1;
      END LOOP;
      FOR i IN 1..table_tab2.COUNT LOOP
        FOR j IN 1..table_tab2(i).COUNT LOOP
          DBMS_OUTPUT.PUT_LINE('Row ' || i || ' element ' || j || ' = ' || table_tab2(i)(j));
        END LOOP;
      END LOOP;
    END;
    Row 1 element 1 = 1
    Row 1 element 2 = 2
    Row 1 element 3 = 3
    Row 2 element 1 = 2
    Row 2 element 2 = 4
    Row 2 element 3 = 6
    You could alternatively dispense with table_tab1 if you prefer, and write directly each element.

  • Search in Nested Tables and Insert the result into new Nested Table!

    How can I search in Nested Tables ex: (pr_travel_date_range,pr_bo_arr) using the SQL below and insert the result into a new Nested Table: ex:g_splited_range_arr.
    Here are the DDL and DML SQLs;
    Don't worry about the NUMBER( 8 )
    CREATE OR REPLACE TYPE DATE_RANGE IS OBJECT ( start_date NUMBER( 8 ), end_date NUMBER( 8 ) );
    CREATE OR REPLACE TYPE DATE_RANGE_ARR IS TABLE OF DATE_RANGE;
    DECLARE
       g_splited_range_arr   DATE_RANGE_ARR := DATE_RANGE_ARR( );
       g_travel_range        DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
       g_bo_arr              DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
       FUNCTION split_date_sql( pr_travel_date_range    DATE_RANGE,
                                pr_bo_arr               DATE_RANGE_ARR )
          RETURN DATE_RANGE_ARR
       IS
          l_splited_range_arr   DATE_RANGE_ARR;
       BEGIN
          SELECT start_date, end_date
            INTO l_splited_range_arr(start_date, end_date)
            FROM (WITH all_dates
                          AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
                              UNION ALL
                              SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
                              UNION ALL
                              SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
                              UNION ALL
                              SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
                       got_analytics
                          AS (SELECT a_date AS start_date,
                                     LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
                                     SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
                                FROM all_dates)
                    SELECT start_date, end_date
                      FROM got_analytics
                     WHERE black_out_cnt = 0 AND start_date < end_date
                  ORDER BY start_date);
          RETURN l_splited_range_arr;
       END;
    BEGIN
        g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
        FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP       
            DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-'  || g_splited_range_arr(index_g_splited_range_arr).end_date );
        END LOOP;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          NULL;
       WHEN OTHERS
       THEN
          NULL;
    END;Or can I create a VIEW with parameters of Nested Tables in it so I can simply call
    SELECT  *
      BULK COLLECT INTO g_splited_range_arr
      FROM view_split_date(g_travel_range,g_bo_arr);

    @riedelme
    For your questions:
    1) I don't want to store in the database as a nested table
    2) I don't want to retrieve data from the database. Data will come from function split_date() parameter and data will be processed in the function and function will return it in nested table format. For more detail please look at the raw function SQL.
    I have a SQL like:
    WITH all_dates
            AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM travel
                UNION ALL
                SELECT tr_end_date, 0 FROM travel
                UNION ALL
                SELECT bo_start_date - 1, 1 FROM black_out_dates
                UNION ALL
                SELECT bo_end_date + 1, -1 FROM black_out_dates),
         got_analytics
            AS (SELECT a_date AS start_date,
                       LEAD( a_date ) OVER (ORDER BY a_date, black_out_val)
                          AS end_date,
                       SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val)
                          AS black_out_cnt
                  FROM all_dates)
      SELECT start_date, end_date
        FROM got_analytics
       WHERE black_out_cnt = 0 AND start_date < end_date
    ORDER BY start_date;I want to change the tables black_out_dates and travel to Nested Array so I can use it in a function with Nested Array travel and Nested Array black_out_dates parameters and the function will return Nested Array of date ranges.
    Here is what I want in raw SQL:
        DECLARE
           g_splited_range_arr   DATE_RANGE_ARR := DATE_RANGE_ARR( );
           g_travel_range        DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
           g_bo_arr              DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
           FUNCTION split_date_sql( pr_travel_date_range    DATE_RANGE,
                                    pr_bo_arr               DATE_RANGE_ARR )
              RETURN DATE_RANGE_ARR
           IS
              l_splited_range_arr   DATE_RANGE_ARR;
           BEGIN
              SELECT start_date, end_date
                INTO l_splited_range_arr(start_date, end_date)
                FROM (WITH all_dates
                              AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
                                  UNION ALL
                                  SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
                                  UNION ALL
                                  SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
                                  UNION ALL
                                  SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
                           got_analytics
                              AS (SELECT a_date AS start_date,
                                         LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
                                         SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
                                    FROM all_dates)
                        SELECT start_date, end_date
                          FROM got_analytics
                         WHERE black_out_cnt = 0 AND start_date < end_date
                      ORDER BY start_date);
              RETURN l_splited_range_arr;
           END;
        BEGIN
            g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
            FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP       
                DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-'  || g_splited_range_arr(index_g_splited_range_arr).end_date );
            END LOOP;
        EXCEPTION
           WHEN NO_DATA_FOUND
           THEN
              NULL;
           WHEN OTHERS
           THEN
              NULL;
        END;I must change the tables black_out_dates and travel in a way so it will be something like
    FROM TABLE( pr_travel_date_range )to get the result into l_splited_range_arr so it will be something like
              SELECT start_date, end_date
                INTO l_splited_range_arr(start_date, end_date)
                FROM (

  • Nested Groups in Component Model

    Is it possible to have a nested group in the Component Model? For example, I have a group of metatdata. That group is called Class and consists of the following fields:
    - Department
    - Number
    - Title
    - Level
    There can be 1:n of these Classes.
    These Classes compose a group called Notice. There can be 1:n Notices. The metadata may look like this.
    Notices
    -- Notice1
    ---- Dept1
    ---- Number1
    ---- Title1
    ---- Level1
    -- Notice2
    ---- Dept2
    ---- Number2
    ---- Title2
    ---- Level2
    I'm busy wearing a different hat at the moment on another project and don't have a lot of time to research this. Thoughts? Thanks in advance for any contribution.

    Hi Bill,
    Here are a few ideas that i hope help. In answer to your question, Groups cannot have groups.
    1. Your group could add a new attribute in your group that is an array of another BPM Object in a "Model" object
    2. You could store the information nested in a relational database.
    When it comes to a presentation, you'd probably want a header that shows the list of "Class" (surprised it let you name the group this without a runtime error). The user would then click one of the "class" items at the top of the scren and then you'd display the nexted group in a section of the screen below the header of the presentation. You'd use a "View" object for the UI and this View would have a group called "NestedStuff" dedicated to displaying the nested array for the class group item picked in the header.
    Dan

  • How to see the output of associative array in procedure

    Hi ,
    I tried the following code
    And confused about looking at the output of the associative array.
    CREATE OR REPLACE PACKAGE test_pak1
    AS
       FUNCTION map_object (obj_typ_in VARCHAR2)
          RETURN VARCHAR2;
       CURSOR c_c1
       IS
          SELECT * FROM emp;
       TYPE test_ttyp IS TABLE OF c_c1%ROWTYPE
                            INDEX BY PLS_INTEGER;
       PROCEDURE search_obj (obj_type VARCHAR2);
    END;
    CREATE OR REPLACE PACKAGE BODY test_pak1
    AS
       FUNCTION map_object (obj_typ_in VARCHAR2)
          RETURN VARCHAR2
       IS
       BEGIN
          dopl ('Hello');
          RETURN abc;
       END;
       PROCEDURE search_obj (obj_type VARCHAR2)
       IS
          test_tab   test_ttyp;
       BEGIN
            DOPL  (test_tab);
          end;
       END;In the above code i want to see the output of the test_tab which is in the procedure search_obj.
    could you please help me in this
    Thanks

    Hi ,
    Though the table has the records , the associatve array declared on this table is showing 0 records..
    Create or replace package test_pak1 as
    FUNCTION map_object ( obj_typ_in VARCHAR2 ) RETURN VARCHAR2;
      CURSOR c_c1
        IS
    SELECT  *
            FROM dept;
        TYPE test_ttyp IS TABLE OF c_c1%ROWTYPE INDEX BY PLS_INTEGER;
    procedure search_obj(obj_type varchar2);
    end;
    Create or replace package body test_pak1 as
    FUNCTION map_object ( obj_typ_in VARCHAR2 ) RETURN VARCHAR2
         IS
      begin
           dbms_output.put_line ('Hello');
      return 'abc';
    end;
    procedure search_obj(obj_type varchar2) is
       test_tab test_ttyp;
      begin
        DBMS_OUTPUT.put_line ('nested array count value'|| test_tab.COUNT);
                             FOR i IN 1 ..  test_tab.COUNT LOOP
                                 dbms_output.put_line( test_tab(i).deptno||' '|| test_tab(i).dname);  end loop;
       end;
    end;  
    begin
      test_pak1.search_obj('HYD');
    end;  Though the table has the records the count of the associative array is showing 0 records ... Why
    Thanks

  • ADF - Collections with Arrays Not Displaying

    I am using JDeveloper 10.12.
    Within the applicaiton I am developing I have the following:
    nominalRecord - Java Bean
    nominalRecordCollection - Collection of nominalRecords
    I have generated a data control from the nominalRecordCollection. The data within each of the nominalRecords is being populated correctly - I know this as I have written a sperate test class to display the data to screen.
    I have tried to display this collection using ADF by dragging and dropping the nominalRecordCollection data control onto a data page. Unfortunately this does not seem to be displaying the data correctly.
    Some of the data within the nominalRecord is contained within Arrays as there are multiple values. For Example:
    String surname;
    String firstname;
    String[] descriptionCode;
    String[] descriptionText;
    This is necessary because an individual may have more that one descriptive features - I need to store them like this because an individual can have any number of descriptive features. e.g.
    01 - Tattoo
    02 - Beard
    03 - Wig
    etc etc.
    When the applicaiton is executed the data that is stored within the String variables within the nominalRecord classes are displayed correctly BUT the data stored within the arrays is not displayed at all.
    I've speant the afternoon looking into this but have not managed to find a suitbale solution. Can ADF in fact render Collections that have Arrays in them?
    I'd appreciate any help/assistance with this matter.
    Thanks in advance for your help
    David.

    What do the JSTL expressions look like where you're trying to access the nested array values?
    See example #45 on my Not Yet Documented examples page of my blog for an example based on your setup here.
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html

  • Nested Objects for a Data Provider in a Data Grid, not displaying data

    Hi, I have a datagrid and the dataprovider for this grid is the result of a RPC call. The result set has the following structure:
    Array
    [0]->Object #1
          [one] => 1
          [two] => 1
          [three] => Object #2
              [apple1] = > Object #3
                  [color] =>    red
                  [rate] => 20
              [apple2] => Object #4 ( the    number of apples is dynamic, apple3,apple4 .. and so on)
                  [color] =>    blue
                  [rate] => 100
    and so on ... so the number of apple objects will vary since its
    dynamic. How do I display this data in a datagrid ??? Please help!! I
    saw many articles on creating the "Nested DataGridColumn " classes...
    like this :
    http://active.tutsplus.com/tutorials/flex/working-with-the-flex-datagrid-and-nested-data-structures/
    it helps, but the problem with my data is that some of the indexes (like  apple1,apple2 etc) are dynamic.
    Also, my flex application is a desktop application (in case that matters). Just to see whats going on, I
    dropped all the nested arrays and used a plain simple one-dimensional array. Even in this case the data
    isnt getting displayed.
    I dont know what im doin wrong. the datafields, labels etc e'thing is correct. I even debugged and
    im getting the result on the flex side. whats going on ?

    No luck ... i converted the result set to a List, and even tried with an iList. Same problem -  nothing gets displayed...
    I have no idea whats happening ....
    This is my code :
    [Bindable]private var privilegesArray:ArrayCollection = new ArrayCollection();
    public function init():void{ // called on creation complete
                    RO.getPrivileges.addEventListener(ResultEvent.RESULT,handleGetPrivileges);
                    RO.getPrivileges();
    protected function handleGetPrivileges(event:ResultEvent):void{
                    privilegesArray = event.result as ArrayCollection;
    <mx:DataGrid id="privilegesDG" dataProvider="{privilegesArray}" width="100%">
            <mx:columns>
                <mx:DataGridColumn headerText="Name" dataField="name" />
                <mx:DataGridColumn headerText="Alias" dataField="alias" />
            </mx:columns>
        </mx:DataGrid>
    The data that gets returned is smthing like this : (for the moment I have removed all the nested objects and arrays and returning just a simple plain array)
    Array => [0] => Object #1
                              [name] => some name
                              [alias] => alias

  • Nested ArrayCollection

    I have an ArrayCollection of 3 arrays: level0, level1, and
    level2. The level0 array item a set of x,y coordinates. The level1
    x,y coordinates are used to position ten objects relative to the
    position of the level0 object. Similarly, the level2 x,y
    coordinates are used to position ten objects relative to the
    position of a level1 object.
    I wish to designate the position of an object, say an HBox,
    with code something like:
    <mx:HBox
    x="{Number(nodeCoordinates.level0[0].x)+Number(nodeCoordinates.level1[3].x)+Number(nodeCo ordinates.level2[9].x)}"
    />
    When I compile the code I get the followign error message:
    "1119: Access of possibly undefined property level0 through a
    reference with static type mx.collections:ArrayCollection."
    I know this isn't a clean way to address the problem. At this
    early point I'm just trying to heavy-handedly get the app to do
    want I want. I'll make the code more efficient later.
    How can I reference and use the values in a nested
    ArrayCollection?
    Thank you in advance!

    "[email protected]" <[email protected]>
    wrote in message
    news:gjp8g6$ahg$[email protected]..
    > Thank you! Yes, your solution works as advertised,
    including the compiler
    > warning. :)
    >
    > I've been trying different means of using the getItemAt
    method to
    > eliminate
    > the warnings, but have come up with the proper syntax
    that recognizes
    > nested
    > arrays in an ArrayCollection. The getItemAt method
    accepts an integer
    > parameter. Does that mean I can't reference a nested
    array?
    >
    > Layout of components needs to be pretty specific. So,
    I'm not able to use
    > the
    > relative means for component layout.
    You could try something like
    x="((nodeCoordinates.getItemAt(0) as
    ArrayCollection).getItemAt(0) as
    YourDataType).x..."
    But I think what rtAlton is trying to say is that there's an
    implication
    here that you've got a "thing" at level 0 that has an x
    coordinate, and then
    you have another "thing" placed at level1 relative to the
    first thing, and
    then there's this HBox that's being positioned relative to
    the level1
    object.
    So it seems like you could do something that puts the level 0
    and level 1
    values into a variable and adds them together, then the level
    2
    ArrayCollection is pulled out as a separate variable,
    simplifying the
    references. Possibly this could be done with custom
    components that
    encapsulate each level.
    HTH;
    Amy

  • Collapsing menu from array

    I need to create a dynamic collapsing menu from an array. so
    far I have the array and first level of the menu working. Now I
    need to create the functionality of the subMenu and I am stumped.
    Is there any good references out there that might be able to walk
    me through this process? Here is my code and my source file can be
    found here
    http://www.actionscript.org/forums/showthread.php3?t=122921

    Sorry I noticed errors in code and in the fla. If you have
    looked at this please check out the new one. The nested array is
    partially loading but then I loose the links that are above it.
    Here is the updated fla which can be found at the link above and
    code

Maybe you are looking for

  • TS1538 sinc session failing to start

    can not sinc because sinc session failed to start. Why is this happening. Ive tried to sinc from the I touch and from I tunes. not working.

  • Regular expression for LOV?

    I have a list of strings in an LOV. I tried filtering it by typing in "^disk" in the search bar, which I hope will return a list of strings starting with "disk", but I failed. Any idea on how to use regular expression for LOVs? Thanks!

  • Strange on idle Bug? Feature?

    Hi Everyone, I was trying to create and on idle handler that would return after about half a second. I tried the following code in xcode but was not able to get it to fire off quicker than about a second. In a fit of sillyness I put -1 on the return

  • How come after I use IMessage, some of my old Text Message are lost?

    And I only have very little message ;P

  • Ichat with hotspots

    Sorry to post this here, but the ichat av link isn't working... Is there a way to connect ichat while using a hotspot? What would the settings be and will I have to ask about settings and such... Thanks