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

Similar Messages

  • Flex Remoting - Deeply Nested ArrayCollections not Stongly Typed

    I have a Flex 3 app which uses remoting. All works relatively well except for the following...
    I have a deeply nested object graph as follows:
    ( btw: each VO uses [RemoteClass(alias="com.mypackage.xxx")] meta tags )
    The main class is called "BrandVO" which contains an ArrayCollection on ProductLineVOs.
    each "ProductLineVO" has an ArrayCollection of "ProductVO"s
    each "ProductVO" has an ArrayCollection of "CaseVO"s, "UseVO"s, and  "IngredientVO"s.
    Pseudo Graphically:
    +-BrandVO
    +----ProductLineVO
    +-------ProductVO
    --------------CaseVO
    --------------UseVO
    --------------IngredientVO
    +-------ProductVO
    --------------CaseVO
    --------------UseVO
    --------------IngredientVO
    +----ProductLineVO
    +-------ProductVO
    --------------CaseVO
    --------------UseVO
    --------------IngredientVO
    +-------ProductVO
    --------------CaseVO
    --------------UseVO
    --------------IngredientVO
    ...etc...
    When I make the remoting call (AMF3) , I properly recieve back an ArrayCollection of BrandVOs...
    (Debugging shows each item in the ArrayCollection [0]...[n] has a Value com.mypackage.BrandVO(@1234etc)
    Expanding each BrandVO shows properly typed nested ProductLineVO elements...
    (Debugging shows each item in the ArrayCollection [0]...[n] has a Value com.mypackage.ProductLineVO(@1234etc)
    Expanding each ProductLineVO shows properly typed nested ProductVO elements...
    (Debugging shows each item in the ArrayCollection [0]...[n] has a Value com.mypackage.ProductVO (@1234etc)
    The problem then is when expanding each ProductVO, the nested CaseVOs, UseVOs, and IngredientVOs ( although they contain the proper data) are typed generically.
    (Debugging CaseVOs shows each item in each ArrayCollection [0]...[n] has a Value Object (@1234etc )
    (Debugging UseVOsshows each item in each ArrayCollection [0]...[n] has a Value Object (@1234etc )
    (Debugging IngredientVOs shows each item in each ArrayCollection [0]...[n] has a Value Object (@1234etc )
    I don't know why all the other VO's get typed correctly but CaseVOs, UseVOs, and IngredientVOs fail to be stongly typed and default to generic Objects.
    I have checked the returning remoting call data ( with ServiceCapture ) and the objects coming back do have the correct types. The problem seems to be at the Flex level.
    Anyone know why this would happen?
    Is there a limit to object grpah depth beyind which objects get typed generically?
    I thought perhaps is was because the ProductVO has 3 ArrayCollections ( CaseVOs, UseVOs, and IngredientVOs ), so I tried removing all but CaseVO and had the same problem... CaseVO was typed as Object.
    Any help/thoughts would be gratly appreciated.
    ~e

    Hey Michael,
    Thank you for the quick response and helpful suggestion.
    Sure enough, if I just call for a CaseVO, it still is generically typed as an Object; so your theory that Flex cannot match up the RO and VO seems to be the correct. I have reviewed the code however and can't see any discrepancies. If you have a moment, can you take a look at the following and see if any errors seem evident:
    The Flex VO
    ==========
    package com.mypackage.vo
       [RemoteClass(alias="com.mypackage.admin.vo.CaseVO")]
       public class CaseVO
            public var caseId:int;
            public var orderNumber:String;
            public var productId:int;
            public var qty:int;
            public var caseWeight:Number;
            public var measurementUnitId:int;
            public function CaseVO()
    The Romote Java RO
    Notes:
    1. The RO package is different then the VO package ( there is an extra "admin" dir component )
        but that shouldn't matter should it?
        ( since the proper mapping is declared in the "alias=" of the VO )
    2. I tried it w/o the serialVersionUID proerty and method
    3. I tried it w/o the equals and hashCode methods
    =================================================
    package com.mypackage.admin.vo;
    public class CaseVO implements Serializable
       public static final long serialVersionUID = 1L;
       private int caseId;
       private String orderNumber;
       private int productId;
       private int qty;
       private float caseWeight;
       private int measurementUnitId;
       public static long getSerialVersionUID() { return serialVersionUID;}
       public int getCaseId() { return caseId; }
       public void setCaseId(int caseId) {this.caseId = caseId;}
       public String getOrderNumber() {return orderNumber;}
       public void setOrderNumber(String orderNumber) {this.orderNumber = orderNumber; }
       public int getProductId() {return productId;}
       public void setProductId(int productId) {this.productId = productId;}
       public int getQty() { return qty;}
       public void setQty(int qty) {this.qty = qty;}
       public float getCaseWeight() {return caseWeight; }
       public void setCaseWeight(float caseWeight) {this.caseWeight = caseWeight; }
       public int getMeasurementUnitId() {return measurementUnitId;}
       public void setMeasurementUnitId(int measurementUnitId) { this.measurementUnitId = measurementUnitId; }
       public boolean equals(Object other)
            if (this == other) return true; 
            if ( !(other instanceof CaseVO) ) return false;
            final CaseVO case = (CaseVO) other;
            if ( case.getCaseId() != getCaseId() ) return false;
            if ( !case.getOrderNumber().equals(getOrderNumber()) ) return false;
            return true;
       public int hashCode()
            int result;
            result = getOrderNumber().hashCode();
            result = 29 * result + getCaseId();
            return result;
    Thanks,
    ~e

  • Putting MovieClips in a Datagrid

    Hey all,
    I have seen pretty limited examples of using the
    cellRenderer to create custom cells in datagrids. Adobe has a
    couple examples of adding checkboxes and drop down lists, but I
    really want to drop a graphic in my datagrid. Has anyone out there
    had any success with this, or know of any resources where I could
    pull some info. I am usually pretty good at taking a demo and
    making it do what I want, but I just can't seem to do it. I think
    what is tripping me up is that the example from Adobe uses a
    "CreateObject" to make the new item in the list and I just want to
    attach a clip from the library. Oh well, let me know any thoughts,
    as I would really appreciate it...

    "nickname118" <[email protected]> wrote in
    message
    news:gh6k5p$m8o$[email protected]..
    > OK, I have two dataproviders for the inner grids. Just
    two array
    > collections, I
    > don't need to go into what the data is. Let's say they
    are just strings or
    > numbers for now.
    >
    > var dataprovider1:ArrayCollection = new ArrayCollection(
    > [{ data: 1, data2: 2, etc..}]);
    > var dataprovider2:ArrayCollection = new ArrayCollection(
    > [{ data: 3, data2: 4, etc..}]);
    >
    > var grid1:DataGrid = new DataGrid();
    > grid1.dataProvider = dataprovider1;
    >
    > var grid2:DataGrid = new DataGrid();
    > grid2.dataProvider = dataprovider2;
    >
    >
    > var outerDataProvider:ArrayCollection = new
    ArrayCollection(
    > [{grid1: grid1, grid2:grid2}]);
    >
    > var outterGrid:DataGrid = new DataGrid();
    > outterGrid.dataProvider = outerDataProvider;
    >
    >
    > I'm not sure what you mean by "information at that level
    of the structure
    > to
    > feed them". I have assigned the data providers, and they
    have data in
    > them...
    > So what do you mean?
    Typically, an itemrenderer is, well, rendering an item. So if
    you have a
    need for a datagrid as an itemRenderer, that item should
    contain data that
    could serve as a dataProvider itself. This would be the case
    if, for
    instance, you had a nested ArrayCollection
    (HierarchicalData), or if you had
    hierarchical XML.
    > I left out the code, but for the collumns I reference
    the appropriate
    > names
    > from each arraycollection in the dataproviders.
    That doesn't even make any sense. To make thiswork, you're
    almost certainly
    going to have to make a custom itemRenderer. I don't think
    there's any way
    to specify a dataProvider for something _inside_ an
    itemRenderer from the
    column definition.
    > And for the outterGrid I assign
    > an itemrenderer of type DataGrid. I do this specifically
    with a
    > ClassFactory,
    > because the itemrenderer field is an IFactory object.
    I understand all the words you used, but they don't come
    together into any
    sort of sensible whole.

  • What event tells me when any data changes in a mx:datagrid?

    I have a mx:datagrid that I need to have an event tell me when anything at all changes in the datagrid. The datagrid can be empty and as such may not have a dataprovider (=null) some of the time. I have looked at a variety of events but none seem to do what i want - can anyone suggest what event i should be listening for please?
    many thanks,
    Mark.

    We have not formalized the concept of nested collections in Flex.  However,
    let me amend my recommendation a bit.
    Typically in a nested collection, the objects in the top-level collection
    are not just collections but an object with some other reference data and
    then a collection like:
        public class FamilyTreeItem
            public var name:String;
            public var children:ArrayCollection;
    The top-level collection is listening for propertyChange events.  Typically,
    as a data item gets modified, a propertyChange event is dispatched.  If the
    data items do not dispatch propertyChange events, then the itemUpdated()
    method is used.  Either way, the result is a COLLECTION_CHANGE event from
    the top-level collection.
    When you have a nested ArrayCollection, while that sub-ArrayCollection is
    dispatching COLLECTION_CHANGE, nobody is listening for it at the top-level.
    You can dispatch it yourself, or you can call itemUpdated() on the top-level
    or dispatch a propertyChange.
    The latter will be the most work, but most general.  Code in FamilyTreeItem
    would attach a listener to the collection for COLLECTION_CHANGE and then
    dispatch a propertyChange as appropriate.

  • Retrieving and using nested xml

    If my xml is in the form of multiple nested "nodes?" then how
    can i go about serilizing them and retrieving them properly?
    Example, if my xml looked like this:
    <data>
    <value>value1</value>
    <value>value2</value>
    <value>value3</value>
    </data>
    then displaying the value would be easy to do in my Datagrid,
    i would just say use "myHTTPservice.lastResult.data.value" and it
    would display in the grid but if my data is more complex like this:
    <data>
    <heading>
    <name>name1</name>
    </heading>
    <heading>
    <name>name2</name>
    </heading>
    <heading>
    <name>name\3</name>
    </heading>
    </data>
    How would I in theory go about serializing the say "name"
    into an array my datagrid could use? if i say the dataprovider is
    "myHTTPservice.lastResult.heading.name then i dont get an array,
    how do say i want all the names found in the heading to be put in
    an array? do have to do this manually on result from my HTTPservice
    and if so any pointers would be good! thank you!

    I think you understand it pretty well. Just through the info
    on E4X and it will probably make a lot of sense to you now.
    Just keep in mind you aren't getting an "Array" or
    "ArrayCollection" but an XMLList which acts like an array where you
    can get its length, address the items using the [ ] operator, etc.
    When using an XMLList as a dataProvider, it would be better
    to convert it to an XMLListCollection so you can take advantage of
    data binding should you need to change the XML on the fly, such as
    editing nodes, adding nodes, or removing nodes. And you can use the
    Collection cursor views, filtering, and sorting.

  • Nested Repeater and Binding Problem - Please Help

    I have nested repeaters and binding seems to work with the
    outer repeater, but not with the inner repeater. I have boiled it
    down to a pretty concise case. If someone could offer hints I would
    be most appreciative!
    I understand the objects I am using to store data could be
    different, but it only looks strange because I had to boil down a
    complex case to a simple case.
    Type a user and then an email address then click to add them,
    the user TextInput and label gets created, but not the email
    address label and text input.
    Basically I want users in an ArrayCollection, and their
    multiple email addresses in an ArrayCollection stored in an Object,
    where I get that email ArrayCollection using the user as the key to
    the object acting as an associative array.
    The attached code should compile fine, so please have a go at
    this. Thanks!

    "Greg Lafrance" <[email protected]> wrote in
    message
    news:gn5p1k$cv9$[email protected]..
    >I have nested repeaters and binding seems to work with
    the outer repeater,
    >but
    > not with the inner repeater. I have boiled it down to a
    pretty concise
    > case. If
    > someone could offer hints I would be most appreciative!
    >
    > I understand the objects I am using to store data could
    be different, but
    > it
    > only looks strange because I had to boil down a complex
    case to a simple
    > case.
    >
    > Type a user and then an email address then click to add
    them, the user
    > TextInput and label gets created, but not the email
    address label and text
    > input.
    >
    > Basically I want users in an ArrayCollection, and their
    multiple email
    > addresses in an ArrayCollection stored in an Object,
    where I get that
    > email
    > ArrayCollection using the user as the key to the object
    acting as an
    > associative array.
    I wouldn't bind to methods like that...I'd make properties
    and bind to
    those.

  • 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 ?

  • ArrayCollection as Data Provider in Tree

    Hi,
         Does anybody know how to use ArrayCollection as a data provider in tree control as i have to access the data later from the database. I'm able to use XMLList as the data provider in the tree control but unable to use ArrayCollection as data provider.
    Please help me in this.
    Thanxs
    Gaurav

    Actually I was just thinking about something I am currently doing.  I am not sure if a tree control will accept a HierarchicalData object as its dataprovider but what you can do is create an array of associative arrays where one of the keys is called children.  This key called children would then point to another associative array.  It could nest down as far as you want but would look absolutely terrible.  I still think XMLList is the way to go but if you really dont want to do that you can try and work this.  Here is some sample of what a simple HierarchicalData object looks like:
    private var masterData:Array = [
                 { OrderId: 10248, CustomerId:"WILMK", EmployeeId:5, OrderDate:"1-Feb-2007",
                children:[
                            {ProductId:11, ProductName:"Quesbo Cabrales", UnitPrice:14, Quantity:12, Discount:0, Price:168},
                            {ProductId:42, ProductName:"Singaporean Hokkien Fried Mee", UnitPrice:9.8, Quantity:10, Discount:0, Price:98},
                            {ProductId:42, ProductName:"Mozzarella di Giovanni", UnitPrice:34.8, Quantity:5, Discount:0, Price:174}
                 { OrderId: 10249, CustomerId:"TRADH", EmployeeId:6, OrderDate:"3-Feb-2007",
                     children:[
                        {ProductId:51, ProductName:"Manjimup Dried Appels", UnitPrice:42.4, Quantity:40, Discount:0, Price:1696},
                        {ProductId:14, ProductName:"Tofu", UnitPrice:18.6, Quantity:9, Discount:0, Price:167.4}
                 { OrderId: 10250, CustomerId:"HANAR", EmployeeId:4, OrderDate:"4-Feb-2007",
                     children:[
                        {ProductId:51, ProductName:"Manjimup Dried Appels", UnitPrice:42.4, Quantity:35, Discount:0.15, Price:1261},
                        {ProductId:41, ProductName:"Jack's Clam Chowder", UnitPrice:7.7, Quantity:10, Discount:0, Price:77},
                        {ProductId:65, ProductName:"Hot pepper Sauce", UnitPrice:16.8, Quantity:10, Discount:0.15, Price:214.2}
    I got this example from a tutorial online explaining how to use nested AdvancedDataGrids but hopefully you can see my point on how you could nest the "nodes" in their parents children object.  It has to be called children because the data object is defaulted to look there. If you created this type of Array all you would have to do then is:
    var hierData:HierarchicalData = new HierarchicalData(masterData);

  • ArrayCollection vs. XML e4x

    I have an application where most of my data comes from web
    services returning arrayColletctions of Objects. I use the
    arrayCollections as my data provider for various data grids. I have
    built a text field for filtering my data grids by using the
    filterFunction of the arrayCollection. Everything works great!
    Now I am populating another datagrid with XML directly thus I
    am using e4x for all my access to the data. I am having a lot of
    difficulty with the most basic functions in my datagrid sorting
    columns and don't have a clue how to implement the filterFunction.
    On my datagrid using e4x I implemented a labelFunction for each
    column to extract the data as well as a sortCompareFunction. For
    some reason my sortCompare function is not working. Some of the
    data is sorted but not all of it.
    Does this sound familiar to anyone? Any ideas where to look?
    Below is some sample code to see if that helps . . .
    Thanks for any help you can offer.

    You have several problems with your code here, and it doesn't
    have anything to do with the data being an ArrayCollection or an
    XMLListCollection.
    One of the problems is the fact that you have "On Behalf Of"
    with an extra space between Behalf and Of. Your sortCompareFunction
    could never even compare the right values. I probably don't have to
    say too much more on comparing strings that contain spaces, right?
    <mx:DataGridColumn headerText="On Behalf Of"
    dataField="text.(@columnnumber == '2')" width="80"
    labelFunction="getNotesName"
    sortCompareFunction="compareNonDateValues">
    The second issue is, you cannot use an E4X expression for the
    dataField (it won't evaluate to anything), this is why you're using
    a labelFunction on that column.
    The third is when you're trying to compare the strings within
    compareNonDateValues(), you're comparing the whole object (you used
    data1 and data2), when you should be comparing the strings data1Str
    and data2Str :
    return ( data1Str.toLowerCase() < data2Str.toLowerCase() )
    ? -1 : ( data1Str.toLowerCase() > data2Str.toLowerCase() ) ? 1 :
    0;
    Not to want to rag on you here, but I hope that you're the
    only one who has to look at that nested ternary. It's just very
    hard to read and even harder to catch a simple mistake.
    The following works for me, see if it does for you. I've
    abbreviated the XML elements, but you get the idea.
    TS

  • Flex: Nested tables as parameter

    Hi,
    is it possible to use nested tables as parameter when transfering data from WD ABAB to Flex?
    In ABAP I have the following context:
    Node Level0 (cardinality 0..n)
    -Node Level1 (cardinality 0..n)
    --Attribute att1.1
    --Attribute att1.2
    -Attribute att1
    -Attribute att2
    In Flex I have this:
    [Bindable]
    public var level0:ArrayCollection;
    [Bindable]
    public var att1:String;
    [Bindable]
    public var att2:String;
    [Bindable]
    public var ..:String;
    [Bindable]
    public var level1:ArrayCollection;
    [Bindable]
    public var att1.2:String;
    [Bindable]
    public var att1.2:String;
    [Bindable]
    public var ...:String;
    It works not as it should be. Any ideas?
    Thanks and redards,
    Roman

    Yes you can do nested datasets. Here are some instructions from the developer on this topic:
    There are two ways to access the child data source.  The first is to just use the normal data source declaration, if you do that you will get the lead selected (or default selected) child data source.  Lets say your context looks like this:
    context root
    +-A (context node)
      +-a1 (context attr)
      +-a2 (context attr)
      +-B  (context node)
        |
        +-b1 (context attr)
        +-b2 (context attr)
    And lets say you create your Flash Island with a GACDataSource name="A" and a child GACDataSource name="B"
    In your Flex code you would declare:
    public var A:Object;
    public var B:Object;
    "A" would be set to the lead selected node for context node "A" and "B" would be set to the lead selected node for context node "B".
    If, however, you would like to iterate through the all of the child context nodes you can use the getDataSourceFieldName FlashIsland function to get the correct child's field name.  Given the previous example the following should work:
    public function set A(val:Object) : void {
        if(!(val is IList))
            return;
        var mainDS = val as IList;
        var childDSField:String = FlashIsland.getDataSourceFieldName(this, B);
        for(var i:int=0; i<mainDS.length; i++) {
            var mainDSRowObject = mainDS<i>;
            var thisRowsChildDS:Object = mainDSRow[childDSField];
            Alert.show('Child ' + i +
                    ': attr1: ' + thisRowsChildDS[BAttr1Field] +
                    ' attr2: ' + thisRowsChildDS[BAttr2Field]);
    public var B:Object;
    public var BAttr1Field:String;
    public var BAttr2Field:String;

  • 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

  • Inner nested repeater cannot be controled at repeat time

    I have two repeaters one nested within the other.
    The first one I can control at repeater run time by
    setting the
        AccRept.startingIndex = 0; //and...
        AccRept.count = 1;
    I can gain no control over the inner nested repeater
    as it does not respond to setting the startingIndex and
    count properties.  The entire data provider is stepped
    through instead.
    Here is the script section:
      <mx:Script>
        <![CDATA[
          [Bindable]
          public var WkLabel:Array=["Week One","Week Two","Week Three","Week Four"];
          [Bindable]
          public var DoWLabel:Array=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday"];
          public function initApp():void
          //Sets up the repeater controls with the right number of components
             //Accordion panes
             AccRept.startingIndex = 0;
             AccRept.count = 1;
             //Open the first pane
             if (AccRept.count > 0){
                 SPAcc.selectedIndex = 1;
             //DoW labels
             DayBlock.startingIndex = 3;
             DayBlock.count = 2;
        ]]> 
      All of the elements in the DowLabel array are cycled through even though the
      DayBlock repeater's properties are set to start at 3 for a total of 2.
      Here are the control definitions:
          <mx:ArrayCollection id="acDOWNames" source="{DoWLabel}"/>
        <mx:ArrayCollection id="acAccPanes" source="{WkLabel}"/>
        <mx:Accordion x="10" y="10" width="900" height="600" id="SPAcc">
            <mx:Canvas label="Meal Plan" width="100%" height="100%">
            </mx:Canvas>
            <mx:Repeater id="AccRept" dataProvider="{acAccPanes}">
               <mx:VBox label="{AccRept.currentItem}" width="100%" height="100%">
                  <mx:Repeater id="DayBlock" dataProvider="{acDOWNames}"  >
                     <mx:HDividedBox width="100%" height="71" liveDragging="true" >
                        <mx:Canvas label="Canvas 1" width="100%" height="100%" backgroundColor="#FFFFCC">
                            <mx:Label x="10" y="10" text="{DayBlock.currentItem} - Breakfast"/>
                        </mx:Canvas>
                        <mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#99ccff">
                            <mx:Label x="10" y="10" text="{DayBlock.currentItem} - Lunch"/>
                        </mx:Canvas>
                        <mx:Canvas label="Canvas 3" width="100%" height="100%" backgroundColor="#99cc99">
                            <mx:Label x="10" y="10" text="{DayBlock.currentItem} - Dinner"/>
                        </mx:Canvas>                   
                     </mx:HDividedBox>                
                  </mx:Repeater>
               </mx:VBox>
            </mx:Repeater>
        </mx:Accordion>
    </mx:Application>

    Hi,
    Since it's an issue about Outlook for Mac 2011, I recommend you post this problem in Office for Mac forum:
    http://answers.microsoft.com/en-us/mac
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share
    their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Melon Chen
    TechNet Community Support

  • 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

  • Using Nested Object Properties as DataGrid dataField

    I am populating a DataGrid with an ArrayCollection of
    Objects. Each of those Objects has a property that is itself an
    Object. I want to use a property of the second (or "nested") Object
    as a dataField for one of my columns.
    Any idea how to make this work? Would a custom item render be
    the only way?

    Using the labelFunction property of the DataGridColumn would
    be enough:
    <mx:DataGrid width="100%" height="100%"
    dataProvider="{myAC}">
    <mx:columns>
    <mx:DataGridColumn dataField="myProperty1" />
    <mx:DataGridColumn dataField="myProperty2" />
    <mx:DataGridColumn
    labelFunction="myOwnLabel" />
    </mx:columns>
    </mx:DataGrid>
    function myOwnLabel(item:Object,
    column:DataGridColumn):String
    return item.myProperty;
    The function must have that signature in order to work, where
    item is an instance of the objects in your dataProvider and column
    is the DataGridColumn calling the function.

  • ArrayCollection in Tree Component

    Hi,
    I've a multi-dimensional array where in its one of the
    attributes another Array is storing. I want to draw the whole
    hierarchy in a Tree component. Is it possible..? Any help will be
    highly appreciated.
    Tnks,
    ASB

    A structure like this works (assume the [ ] ActionScript
    array syntax indicates ArrayCollections). I'm using periods to
    indicate spaces to illustrate the structure of the arrays because
    this forum strips out whitespace.
    [ {label:"New York", children:[
    .......{label:"Albany"},
    .......{label:"Syracuse"}]},
    ..{label:"Florida",children:[
    .......{label:"Jupiter"},
    .......{label:"Miami"},
    .......{label:"Ft. Lauderdale"}]}
    The key is the
    children member which indicates the next level of array
    nesting. The Tree is looking for this label specifically.

Maybe you are looking for

  • How do i set the home button to refresh open tabs instead of opening new ones each time i click on it

    Everytime i click on the "home" button, FF 3.6 opens my three home pages as three new tabs. If i click twice, it opens three more. In IE, if i click the home button i have a choice to either refresh the three tabs starting with which ever one is open

  • Manage the response of Web Service in case of Fault

    Hi, invoking the adapter HTTA, the Web Service send a response. B1i manage only the failure of adapter HTTA, but not the response of Web Service. If you want use the PostProcessing BizFlow correctly, i need to manage the response for check the presen

  • Printing/saving to PDF...  pdf file size is enormous...

    I am trying to convert a psd file that is a 36"X80" banner to a pdf file.  In the past, I have printed to PDF and all has been fine.  Today the Print to PDF fails...  it doesn't give me an error it just pretends like it prints to pdf with the status

  • Running Acrobat inside Virtual IE 9

    Our computers have Internet Explorer 11 and Acrobat XI installed. We have a single web application that requires IE 9. So I virtualized IE 9 using a template, no problem there. While running the web application in virtual IE 9 it needs to open pdf fi

  • Shortcuts in x term (alias)

    I've brought this up before but never really perfected it, i've spent a bit of time on it now and its very useful and quite easy to do. Firstly the shortcuts - 'alias' is similar to macro's in windows. Its using a letter, series of letters/numbers or