Flex MX:TREE based on GroupingCollection2 datasource?

I have an ArrayCollection that consists of VO objects derived from a database query. I have grouped this collection of objects using the GroupingCollection2 object, but cannot for the life of me figure out how to bind it correctly to my tree control. It only displays [object GrouingCollection2] in the tree container, but not the objects contained within the GroupingCollection2 object. Any idea on what I might be doing wrong?
Thanks!

Also, you can fetch the grouped data from GroupingCollection and assign that to the Tree control. For example -
         <mx:Script>
          <![CDATA[
               protected function button1_clickHandler(event:MouseEvent):void
                            gc.refresh();
                            tree.dataProvider = gc.getRoot();
          ]]>
     </mx:Script>
     <mx:GroupingCollection2 id="gc">
          <mx:source>
               <mx:ArrayCollection>
                    <mx:Object day="1" hour="1" Skill0="1"/>
                    <mx:Object day="1" hour="2" Skill0="1.5"/>
                    <mx:Object day="1" hour="3" Skill0=".25"/>
               </mx:ArrayCollection>
          </mx:source>
          <mx:grouping>
               <mx:Grouping label="day">
                    <mx:GroupingField name="day" />
               </mx:Grouping>
          </mx:grouping>
     </mx:GroupingCollection2>
     <mx:Tree labelField="day" id="tree" width="200" />
     <mx:Button label="Group" click="button1_clickHandler(event)" />

Similar Messages

  • How to create dynamic tree based on BAPI

    Hi
    I am able to create dynamic tree based on flat file structure example given in SDN . But how to create the tree from BAPI directly.Also when I will be clicking on any leaf node of the tree some data related to the node will be passed to another view.
    Regards
    Ananda

    What i'm trying to do is create an organizational structure.
    Global>Region>Plant-->Corporation
    The output from the RFC is a structure containing every possible combination for orgazational hierarchy. Basically a flat table with record for every possible combinaton of Region-Plant-Corporation. This data needs to be bound to a tree structure so that we can call BW queries based on that level. For example: Give me aged inventory for the SAP corporation within the plant Berlin that is located in the Europe region.
    Now that you understand the business reason will the nodes that represent Region and Plant and corporation be non-singleton nodes or recursive? I was thinking a hierarchy of non-singleton nodes.
    I can bind these nodes to the Region - Plant - Corporation elements returned from in the flat table structure. I will probably get duplicates as a specific Region will be listed multiple times for every possible combination of the data beneath it. I'm not so concerned about that right now as I want to make sure I understand how in Web Dynpro to bind the data to the tree.
    Hopefully this makes some sense. Can you elaborate on how this may be constructed in context of the view?
    Would i create a model node for region (0..n), model node for plant (0..n), and a model node for Corporation (0..n)?
    Or does this sound totally incorrect?
    julian
    We have 3 regions over 50 plants and probably around 500 corporations.

  • Strange Flex 3 Tree behaviour. A bug?

    Hello Everyone!
    I use the flex 3 Tree component with a custom data
    descriptor.
    The data-structure, which is processed by the data
    descriptor,
    allows that one node may have several parent-nodes.
    In this case the node is being shown in tree several times -
    once for every
    parent-node.
    The node itself may also have several children. (Some sort of
    a simplified Graph structure.)
    This is rendered well, but when I open the node in the tree,
    the same node is automatically
    opened by other parent-nodes. When i move the mouse-pointer
    over the nodes-children. they are not highlighted, and the
    respective children of some other parent-node are.
    Any Ideas?
    Thanks!

    "newflexquest" <[email protected]> wrote in
    message
    news:gcfaoi$5i$[email protected]..
    > Thats right, this behaviour takes plase only while using
    the same object
    > instance several times in the tree.
    > The bad stuff is that i need exactly this :)
    > I cannot destroy data-integrity by duclicating nodes and
    all of their
    > children, and their children and so on...
    >
    > I made a debug in Tree, List and ListBase classes. The
    behaviour is as
    > follows:
    > 1. DisplayObjects are created for each appearance of the
    data-object in
    > the
    > tree.
    > 2. On mouse-over event the display-object is taken to
    find corresponding
    > data-object. Data-objects are stored in a map as
    key-value pairs, where
    > the key
    > is object-id and the value is the object itself (plus
    the coordinates on
    > the
    > screen).
    >
    > Therefore it is clear: if an item must appear twice in
    the tree, related
    > data-object may not be placed twice to the map (key
    violation). So at the
    > end
    > we have at the background only ONE data-object for all
    of the
    > display-objects
    > which represent duplication of the same item. And this
    one object contains
    > only
    > one set of coordinates (of one related display object).
    > It is not important on which of the duplicated display
    objects you fire
    > the
    > mouse-over event. You will see the highlicht only on the
    display-object,
    > whichs
    > coordinates are stored in the map.
    >
    > I hope the explanation is not heavy to read.
    Write your own tree...?

  • Tree based on XML DB files

    Has someone ever tried to build a tree based on XML DB files?
    Regards,
    Learco

    Hello,
    Yeah I've done that before, I basically was getting XML exports and was running them against one of 3 XSLT's , users choice , and one was a tree. I'll dig up the code.
    Or are you talking about building a tree based on all the files in XMLDB to navigate around them, I have a start on that I can give you as well, never finished it though.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Query based on Master datasource? - URGENT

    Hi Experts,
    Is it possible to create a query based on MASTER Datasource(Z master datasource)? if possible then how we can go or are there any setttings?...i got confused here..
    thanks in advance.
    regards,
    mahantesh

    If you mean an Infoobject masterdata record, you need to change the IO, Mater data/text tab, check charachter is data target/Infoprovider flag an activate the IO.
    Now you can use it in BEX
    Regards

  • Tree based on class CL_GUI_COLUMN_TREE.

    Hi,
    i use a tree based on class CL_GUI_COLUMN_TREE.
    Now i wish to adjust the column width of  the first hierarchy column. It doesnt work with method "ADJUST_COLUMN_WIDTH" because is it a hierarchy column.  Is there any other method? or how i must fill the "exporting" hierarchy_header when i create the object?
    Stefan

    I'm showing that I do this using the hierarch_header when creating the object in one of my programs.
    data:  hierarchy_header type treev_hhdr.
    * Setup the hierarchy header
        hierarchy_header-heading = 'Transactions'.
        hierarchy_header-width   = 30.    "<<--  Set the width
    * Create a tree control
        create object tree
          exporting
            parent                = container
            node_selection_mode   = tree->node_sel_mode_single
            item_selection        = ' '
            hierarchy_column_name = 'Column1'
            hierarchy_header      = hierarchy_header       <<---  Right here
         exceptions
            others                      = 7.
    Regards,
    Rich Heilman

  • Hierarchical tree based on columns in the same row

    Hi guys,
    I have the following table:
    TABLE A:
    COL1 COL2 COL3 COL4
    1 2 5 8
    1 2 6 9
    1 3 1 3
    1 4 2 4
    ... then, as I have ordered the info, I want to implement a tree based on every row of my table.
    Could you help me with the procedure please??
    Thanks.

    REPOST

  • How to create characteristics in BW based on generic datasource fields

    hi ALL,
       Actually, i created generic datasource based on database view in SAP R/3
    Database view is created based on table LFA1.
    Replicated the the datasource in SAP BW
    Now, I have to create characteristics (master data) based
    on generic datasource fields
    Thanks in Advance.
    Best Regards
    M A Mubeen

    Hi Abdul,
        for that you just create  one  charecterstic  of  Info object (with the  same technical charecterstics of R/3 field).. and  maintain master  data..
    now create one data source in  BW side.. and  select your data source and replicate  data with your generic datasource...
    and load the data..
    regards
    @jay

  • Populating the tree based on the XML datasource

    We have a XML document that contains the required information regarding tree hierarchy.
    We would like to use this XML document as a datasource for the ADF tree/treeTable component.
    Can you please provide pointers for achieveing the same?
    Thanks in Advance,
    Navaneeth

    Two options are the URL Data Control: http://www.oracle.com/technetwork/developer-tools/jdev/urldatacontrol-099677.html
    or using JAXB with TopLink/EclipseLink to create Java objects that map to the XML and then exposing those as data controls.

  • How to create a tree based on directory structure

    I want to create a hierarchical tree in Forms 6i based upon a file system directory structure (similar to Windows Explorer). How can I populate a tree with this information, is there something that I can call or write that would return the file system structure in a format that I can populate my tree?
    Any advice would be greatly appreciated.
    Thanks
    Richard

    Your link does not seem to work.They're re-jigging all the links to accomodate the hot poop on Oracle's latest and greatest, 10G. So at least the website is on schedule even if the actual software delivery dates have slipped :P
    We can still get D2KWUTIL from here: http://te chnet.oracle.com/software/products/forms/content.html
    Cheers, APC

  • How to include 0STOCK_VAL in a Query based on APO DataSource?

    Hi All,
    I have a requirement to include *0STOCK_VAL" from Inventory to the APO InfoCube. But the problem with this is, this particular KeyFigure is not present in the APO hence it cannot be included in the APO DataSource i.e. we cannot get this from the Source System.
    I checked the Production system, 0STOCK_VAL InfoObject is avaiable in one of the InfoCube but it is not present in any DSO's. Since it is not present in any of the DSO's we cannot write a Routine to read it from any of the table.
    I even thought of including the InfoCube where 0STOCK_VAL is present into a MultiProvider along with the APO InfoCube. I can define the joining condition based on Plant and Material. But if I drill down any other characteristics which are not common in both the  InfoCube then we will have a blank line in the Query which is not recommended.
    But this KeyFigure is very much needed in the Query.
    My question is how to include this in the APO InfoCube or How to get this in the Query with values??
    Can anybody please help me on this.
    Thanks in advance.
    Prasapbi

    hi Matt,
      In your example like a transaction was paid for with a payment type of PTAM, then you need all the transaction details. I suppose that all the required transaction details along with payment type PTAM will be loaded into an infoprovider and you run a report on top of this infoprovider. Then for that report you need to have a selection screen variable for Payment Type and if the user enters the payment type PTAM, then he can get all the other transaction details from the infoprovider.
    Let me know if i don't understand the requirement correctly.
    Hope it helps....

  • Identify the Queue Name Based on the Datasource

    Hi Experts,
    How do we find the Queue name ( say for 2LIS_03_BF) in LBWQ based on Datasource/Extractor (2LIS_03_BF).
    Thanks,
    Satya

    Hi,
    Thanks for your reply,
    I have a question based on the above reply that Queue Name is based on the Application or Datasource?
    Thanks,
    Satya
    Edited by: satya prasad on Mar 11, 2010 11:21 AM

  • Flex 4 tree component - how to populate using an array?

    It's unclear how to populate a tree control using an array as the dataprovider like you could in Flex 3.
    Here is a Flex 3 example. Even when I replace the mx:Object tags with fx:Object tags things don't work ... there seems to be no mx:children tag ...
    http://blog.flexexamples.com/2007/12/03/using-an-array-as-a-data-provider-in-a-flex-tree-c ontrol/
    Please advise.

    This should do it:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/halo">
        <fx:Script>
            <![CDATA[
                private function tree_labelFunc(item:Object):String {
                    var suffix:String = "";
                    if (tree.dataDescriptor.hasChildren(item)) {
                        suffix = " (" + item.children.length + ")";
                    return item.name.toUpperCase() + suffix;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:Array id="arr">
                <fx:Object name="One">
                    <fx:children>
                        <fx:Array>
                            <fx:Object name="Two" />
                            <fx:Object name="Three" />
                            <fx:Object name="Four">
                                <fx:children>
                                    <fx:Array>
                                        <fx:Object name="Five" />
                                        <fx:Object name="Six" />
                                    </fx:Array>
                                </fx:children>
                            </fx:Object>
                            <fx:Object name="Seven">
                                <fx:children>
                                    <fx:Array>
                                        <fx:Object name="Eight" />
                                    </fx:Array>
                                </fx:children>
                            </fx:Object>
                            <fx:Object name="Nine" />
                        </fx:Array>
                    </fx:children>
                </fx:Object>
            </fx:Array>
        </fx:Declarations>
        <mx:Tree id="tree"
                dataProvider="{arr}"
                labelFunction="tree_labelFunc"
                width="200"
                horizontalCenter="0"
                verticalCenter="0" />
    </s:Application>
    Peter
    Update: I also posted the updated Spark example at http://blog.flexexamples.com/2007/12/03/using-an-array-as-a-data-provider-in-a-flex-tree-c ontrol/.

  • Flex Using Tree Control in item renderer(Url Navigate)?

    HI All.,
                Iam Using flex 3 using tree control in item renderer to click haschildren label to be navigate url is possible ?.
    Any one help me.....
    Thanks in Advance......

    You can do this by writing the item's tag to the ActiveItemTag property, the column number you're intersted in to the ActiveColNum property and reading the Cell String Property.
    Mike....
    PS: If anybody at NI is listening, that interface really, really, REALLY needs to get rewritten...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    tree_properties.vi ‏9 KB

  • Flex - 3 Tree Control

    Hi,
    I have to display Tree items in clickable link item as simillar to LinkButton.
    Can anyone help me plz.
    Thanks!

    Thanks buddy for the answer.
    Unfortunately the answer came after quite long time of posting the message. Anyway I was able to open a tree on demand using HttpService and due to my new requirement I changed it to RemoteObject.
    I my latest change I am able to populate tree nodes on demand and also the same solution if getting update from server via JMS using Consumer object.
    I kind a like this solution because it took me good amount of effort to find the right solution.
    If any one is intersted the he/she can reply to the post and I can provide code here or may at some location so that it can be easily downloaded.
    The solution is Flex-Grails combination.
    Thanks everybody.

Maybe you are looking for

  • How to check the Sharepoint User group of the current user in infopath

    hi, i have a published  infopath form in which there a field ( people and groups). so i am storing the user account name using the GetUserProfilebyName. below is how i am setting the values of the field EmployeeName(People & Group). set fields value

  • Switching on/off WiFi by main menu icon

    I had configured my Snow Leopart to ask for password confirmation when switching on/off the Airport. Whenever triggered the password popup came up and the user was able to immediately enter the password, because the dialog automatically received keyb

  • When  submit remote object call getting error Client.Error.DeliveryInDoubt

    Hello, We are having very weird error DeliveryInDoubt from blazeds. [ERROR] failed to call the remote service !!![FaultEvent fault=[RPC Fault faultString="Channel disconnected" faultCode="Client.Error.DeliveryInDoubt" faultDetail="Channel disconnecte

  • Release strategy based on costcentre for PR

    Hi Experts I want to add Cost Centre as my release criteria in the existing release strategy . Presently I have Purchase grp and amount as my release criteria . Pls advise me how to proceed on this . Kindly also let me know how the user can be mapped

  • JSrollPane

    Hello! I've filled a JScrollPane with some components. When I try to add a some new components and repaint the scroll pane, the picture on the screen starts to twitch. What can I do in this case? Help me, please. TIA