Regarding mx:Tree onselect event of childs

Hi Frens,
I had created simple application, Now I had a mx:Tree
component here, All the options i m providing to this tree using
the XML ListCollection. Now I want when i click one of the options
of tree one particular view should be made visible, so how can i
get the value of a particular option in script. What should be
script for this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" xmlns:local="*">
<mx:XMLListCollection id="MessageOptions"
source="{Folders}"/>
<mx:XMLList id="Folders">
<folder label="Mail">
<folder label="AllMsd" />
<folder label="WRITE" />
<folder label="PrivateMSg" />
<folder label="Deleted" />
</folder>
</mx:XMLList>
<mx:HDividedBox x="30" y="60" height="100%" width="100%"
>
<mx:ApplicationControlBar id="acbDashboard" x="20" y="10"
height="90%" width="20%" borderThickness="4" borderColor="#41244"
verticalAlign="middle">
<mx:Tree id="tree1" dataProvider="{MessageOptions}"
labelField="@label" showRoot="true" width="100%" height="100%"/>
</mx:ApplicationControlBar>
<mx:VDividedBox id="acbMain"
x="{acbDashboard.width+acbDashboard.x+10}" y="10" height="90%"
width="78%" >
<mx:ApplicationControlBar id="acbInbox" width="95%"
height="60%" >
<local:MyVBox id="AllMsges" width="100%" height="100%"
visible="true">
</local:MyVBox>
<local:MyCompose id="vbWriteMsg" visible="false">
</local:MyCompose>
<local:MyCompose id="vbMyMsg" visible="false">
</local:MyCompose>
<local:MyCompose id="vbDeletedMsg" visible="false">
</local:MyCompose>
</mx:ApplicationControlBar>
<mx:ApplicationControlBar id="acbDetails" width="95%"
height="40%">
<mx:VBox width="100%" height="100%">
<mx:Label text="MESSAGE" width="100%" height="20"
fontWeight="bold"/>
<mx:Spacer height="2" />
<mx:TextArea id="txtMessage" width="98%" height="80%"
editable="false" />
</mx:VBox>
</mx:ApplicationControlBar>
</mx:VDividedBox>
</mx:HDividedBox>
</mx:Application>
Plz tell me.

in italian
http://www.augitaly.com/flexgala/index.php?cmd=newsreader&id=129
http://www.augitaly.com/flexgala/index.php?cmd=newsreader&id=123

Similar Messages

  • Problem with onSelect event for DropdownbyIndex in the IView

    Hello ,
    I have an webdynpro for java application where I am using Dropdownby Index. I have associated onSelect event for the dropdown by index. When I launch the application in the standalone mode ( direct application launch) every thing works fine. The onSelect event for the dropdown is also working fine.
    I have made an Iview of the webdynpro application. Here on select of the dropdown box  I am getting a java script error "Access Denied". Please can you suggest me how do I correct this strange problem .
    I have developed the webdynpro application in NW640 SP15 .
    Thanks in advance for the help
    V Vinay

    Hi Vinay,
    Does the portal and the application inside of the iView run both on HTTP or HTTPs? Mixing them is not possible.
    Best regards,
    Thomas

  • Control Framework tree control event not trigerring

    The event handle_node_double_click is not trigerring on the tree controls . I want to display the contents of the nodes on the text editor on trigerring of this event
    *& Report  ZCONTROLS_TREE_TEDIT_SPITTER
    REPORT  zcontrols_tree_tedit_spitter.
    DATA : editor TYPE REF TO cl_gui_textedit,
           tree   TYPE REF TO cl_gui_simple_tree.
    DATA : container TYPE REF TO cl_gui_custom_container,
           splitter  TYPE REF TO cl_gui_easy_splitter_container,
           right     TYPE REF TO cl_gui_container,
           left      TYPE REF TO cl_gui_container.
    DATA : node_itab LIKE node_str OCCURS 0.
          CLASS EVENT_HANDLER DEFINITION
    CLASS event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS : handle_node_double_click
                  FOR EVENT NODE_DOUBLE_CLICK OF cl_gui_simple_tree
                  IMPORTING node_key.
    ENDCLASS.                    "EVENT_HANDLER DEFINITION
          CLASS EVENT_HANDLER IMPLEMENTATION
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_node_double_click.
      perform node_double_click using node_key.
      ENDMETHOD.                    "HANDLE_NODE_DOUBLE_CLICK
    ENDCLASS.                    "EVENT_HANDLER IMPLEMENTATION
    data : handler1 type ref to event_handler.
    START-OF-SELECTION.
      CALL SCREEN 9001.
    *&      Module  start  OUTPUT
          text
    MODULE start OUTPUT.
      SET PF-STATUS 'ZSTAT1'.
      IF container IS INITIAL.
        CREATE OBJECT container
          EXPORTING
             container_name              = 'CONTAINER_NAME'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CREATE OBJECT splitter
          EXPORTING
            parent            = container
            orientation       = 1
            name              = 'Mohit'
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        left  = splitter->top_left_container.
        right = splitter->bottom_right_container.
        CREATE OBJECT editor
          EXPORTING
            parent                 = right
            name                   = 'MohitEditor'
          EXCEPTIONS
            error_cntl_create      = 1
            error_cntl_init        = 2
            error_cntl_link        = 3
            error_dp_create        = 4
            gui_type_not_supported = 5
            OTHERS                 = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CREATE OBJECT tree
          EXPORTING
            parent                      = left
            node_selection_mode         = tree->node_sel_mode_single
            name                        = 'MohitTree'
          EXCEPTIONS
            lifetime_error              = 1
            cntl_system_error           = 2
            create_error                = 3
            failed                      = 4
            illegal_node_selection_mode = 5
            OTHERS                      = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        PERFORM fill_tree.
        CALL METHOD tree->add_nodes
          EXPORTING
            table_structure_name           = 'NODE_STR'
            node_table                     = node_itab
          EXCEPTIONS
            error_in_node_table            = 1
            failed                         = 2
            dp_error                       = 3
            table_structure_name_not_found = 4
            OTHERS                         = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      create object handler1.
      set handler handler1->handle_node_double_click for tree.
      ENDIF.
    ENDMODULE.                 " start  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE user_command_9001 INPUT.
      CALL METHOD cl_gui_cfw=>dispatch.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Form  fill_tree
          text
    -->  p1        text
    <--  p2        text
    FORM fill_tree .
      DATA : node LIKE node_str.
      CLEAR node.
      node-node_key = 'head_mohit'.
      node-isfolder = 'X'.
      node-text = 'Mohit'.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child1'.
      node-relatkey = 'head_mohit'.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-text = 'Mohit is the best '.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child2'.
      node-relatkey = 'head_mohit'.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-text = 'Mohit is the bestest '.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'head_JAIN'.
      node-isfolder = 'X'.
      node-text = 'jAIN'.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child3'.
      node-relatkey = 'head_JAIN'.
      node-relatship = cl_gui_simple_tree=>relat_next_sibling.
      node-text = 'cnh INDIA '.
      APPEND node TO node_itab.
      CLEAR node.
      node-node_key = 'Child4'.
      node-relatkey = 'head_JAIN'.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-text = 'SAP  '.
      APPEND node TO node_itab.
    ENDFORM.                    " fill_tree
    *&      Form  node_double_click
          text
         -->P_NODE_KEY  text
    form node_double_click  using  p_node_key type TV_NODEKEY.
    DATA : node LIKE node_str.
    DATA textline(256).
    DATA text_table LIKE STANDARD TABLE OF textline.
    READ TABLE node_itab WITH KEY node_key = p_node_key
                             INTO node.
    endform.                    " node_double_click
    *&      Module  exit  INPUT
          text
    module exit input.
    CASE sy-ucomm.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
    ENDCASE.
    endmodule.                 " exit  INPUT

    Hello Mohit
    Here is a sample routine (taken from BCALV_TREE_02) which you have to add and adapt for your report. It does two things:
    1. Register events that should be handled (required but not sufficient for event handling)
    2. Set event handler for registered events
    The first step is different from ALV grid controls because here all events are already registered with the control (not the control framework).
    Set the event handler (statement SET HANDLER) registers the event handling with the control framework.
    FORM register_events.
    *§4. Event registration: tell ALV Tree which events shall be passed
    *    from frontend to backend.
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event,
            l_event_receiver TYPE REF TO lcl_tree_event_receiver.
    *§4a. Frontend registration(i):  get already registered tree events.
    * The following four tree events registers ALV Tree in the constructor
    * method itself.
    *    - cl_gui_column_tree=>eventid_expand_no_children
    * (needed to load data to frontend when a user expands a node)
    *    - cl_gui_column_tree=>eventid_header_context_men_req
    * (needed for header context menu)
    *    - cl_gui_column_tree=>eventid_header_click
    * (allows selection of columns (only when item selection activated))
    *   - cl_gui_column_tree=>eventid_item_keypress
    * (needed for F1-Help (only when item selection activated))
    * Nevertheless you have to provide their IDs again if you register
    * additional events with SET_REGISTERED_EVENTS (see below).
    * To do so, call first method  GET_REGISTERED_EVENTS (this way,
    * all already registered events remain registered, even your own):
    call method g_alv_tree->get_registered_events
          importing events = lt_events.
    * (If you do not these events will be deregistered!!!).
    * You do not have to register events of the toolbar again.
    *§4b. Frontend registration(ii): add additional event ids
      l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
      APPEND l_event TO lt_events.
    *§4c. Frontend registration(iii):provide new event table to alv tree
      CALL METHOD g_alv_tree->set_registered_events
        EXPORTING
          events = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.     "#EC NOTEXT
      ENDIF.
    *§4d. Register events on backend (ABAP Objects event handling)
      CREATE OBJECT l_event_receiver.
      SET HANDLER l_event_receiver->handle_node_double_click FOR g_alv_tree.
    ENDFORM.                               " register_events
    Regards
      Uwe

  • OnSelect event for a Drop down UI Element in Webdynpro ABAP Select Options

    Hi Experts
    We have built our UI based on the webdynpro ABAP Select Options. We have a requirement that, when we change the value of a drop down box in the UI, I need to hide some fields. Can anybody help me out in handling of OnSelect event of a drop down box built using webdynpro ABAP Select Options. We are on SAP Netweaver 7.0 EHP1.
    Rrgards,
    Srikanth.
    Edited by: Srikanth Kancherla on Apr 29, 2010 10:43 PM

    Hi Srikanth,
    as you seem to be already aware, the component is dynamically built.
    so you would have to enhance the code that builds the element and insert a reference to a new action (enhancement) that could handle the onSelect event.
    What is it about this that you particularly want help with?
    Cheers,
    Chris

  • How to get the tree index of a child node

    Hi, I am loading a tree object from an XML source file (via
    an XMLListCollection)
    I can find the children on the currently selected node, like:
    var children:XMLList =
    XMLList(myTree.selectedItem).children();
    for(var i:Number=0; i < children.length(); i++) {
    trace("Child Found: " + children
    .@caption);
    But how can I determine the tree index for each of the
    children? I would like to be able to grab and save the tree index
    for each child, so that I can later just to do
    "myTree.selectedIndex = (saved child index) (based on some form
    action the user performs). I can't find any method of determining
    what the tree index for a child is, other than walking down the
    tree from the parent node and counting the number of nodes till I
    hit each child. Is there a simple method?

    Tree is hierarchical, index is linear. I have never seen
    anyone successfully use selectedIndex with Tree.
    You best bet is to put an id on each node and use e4x
    expression to find that node when you want.
    Tracy

  • Tree selection event in jtree

    hi
    i'm using a jtree in my gui but im facing a problem
    jTree1.addTreeSelectionListener(new TreeSelectionListener() {
                   public void valueChanged(TreeSelectionEvent e)
                        jTree1_valueChange(e);
    as you can see that whenever i click on a particular node in the tree the tree selection event occurs which calls the valuechanged method and it does as required but if i click again on the same selection as before the tree selection event does not occur and it does not call the method so say that the node i'm selecting is supposed to be dynamic and has to be refreshed if i click on it again it will not update itself through the value changed method. can somebody please tell me a way to be able to get the valuechanged method even if i click on the same selection.
    im a bot new to java swing programing so please if you could be a little more explanatory it could help
    thanks

    You problem is talked about (and a solution proposed) in the JavaDoc.
    See the code sample in the doc header from http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTree.html

  • ADF 10.1.3.0.4: tree leaf with no child nodes still displays folder icon?

    I was reading through Frank Nimphius's Blog and found the entry entitled "ADF Faces: Building a hierarchical tree from recursive tables - October 05, 2006" and found a tree example in which a tree leaf with no child nodes do not display the folder icon.
    I've followed the instructions listed with adf:tree, CoreTree and ChildPropertyTreeModel, but my tree leaves with no child nodes still displays the folder icon.
    How do I remove this icon when the node is a leaf with no children?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured it out.
    I used the ChildPropertyTreeModel.isContainer() method.
    --Todd                                                                                                                                                                                           

  • OnSelect event in THTMLB ddlistbox

    Hi,
          I'm using the OnSelect event for the dropdownlistbox. However, after the eventhandler finishes, the listbox resets and goes to the initial value. The selected entry is not retained. All the rest of the fields in the page retain their values. Can anyone provide workaround for this?

    Peter,
           I have bound the selection attribute of the listbox to  a value attribute created under the context nodes. I have checked the value of this value attribute after selecting from the dropdown list. It is able to store the item selected and I'm able to populate other fields based on that. I can't understand why the listbox is reset. OnClientSelect has no issues, but I can't use that. I will have to use the debugger with some patience. Hey, thanks a lot. You've helped me out with other questions as well. I will check this out and award you points.
    Arun Prakash.
    Edited by: Arun Prakash Karuppanan on May 17, 2008 9:46 PM

  • Webdynpro ABAP component TREE - on event onaction do onloadchildren

    Hi experts,
    I have a specific requirement from my client. On our custom WD ABAP app (see below) which has a CL_WD_TREE component we want to force the event onaction on the tree node to do exactly the same of event onloadchildren of the node selected:
    This will avoid some questions on the users that are not pressing the small triangle to load node's children. Is there any way to load children when executing event onaction on the node selected?
    Thanks in advance.
    Best Regards,
    AS

    Hi Andre,
    If you need to fill child data based on the parent, then define supply function to the child node.
    for eg: create SALES node under node MATERIAL. MATERIAL is a parent node and SALES is a child node. define supply function to the child node as shown
    Supply function gets called automatically when mateials node is filled
    Supply function gets called
    1. When the node is initial
    2. on the lead selection
    Thanks & Regards,
    Sankar Gelivi

  • Tree itemOpen event disable

    Hi,
    Is it possible to not allow expansion or collapse of a node in a tree based on a condition?
    My problem is that on click of a tree item I display some text fields corresponding to the clicked item which can be modified by the user and updated. In case the user modifies the fields but doesn't update (click the update button), he shouldn't be allowed to expand/collapse any nodes in the tree. I put a check after the itemOpen even is fired but by the time the program flow reaches the handler function for itemOpen the expansion has already happened.
    Any suggestions to prevent this?
    Thanks,
    Abhishek

    Hello,
    I think the event you're looking for is not "Drop", but "Drag Ended".
    This event will give the result of a drag action ("Drop Cancel", "Drop Move" or "Drop Copy").
    Kind regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Dispatch event to child of NavigatorContent

    Hi,
    I'm working on moving a project over to Flex 4 and so far I really like it, but I'm stuck on a particular issue.
    Previously I had a ViewStack where each child was a custom component.  For Flex 4, I've changed it so that each child is a NavigatorContent component that includes the custom component as in:
            <mx:ViewStack id="elementsViewStack" width="100%" height="100%" >
                <s:NavigatorContent id="retrieveDataView"><system:RetrieveDataView/></s:NavigatorContent>
                <s:NavigatorContent id="backupDataView"><system:BackupView/></s:NavigatorContent>
            </mx:ViewStack>
    Whenever I change the view, I need to update the data that is being displayed and so I would key that off of a show event.  In some cases, I had to specifically send a show event because the view would stay the same, but I needed to update the data anyway, so I would just dispatch the event to the selected child of the view stack.
    Since I now have to wrap the custom component in a navigator content component, this strategy no longer works because the show event goes to the navigator content component rather than my custom component (or at least, that's what I'm assuming is happening).  I tried to access the custom component as a child of the navigator content component, but it tells me there are zero elements, so I don't know how to dispatch the event to my custom component given this situation.
    The other approach I tried was to make my custom component a navigator content component instead of an s:group component, but for some reason that makes the states in my custom component not work correctly.  I know the state is being set correctly as a trace in actionscript shows, but the elements aren't included correctly based on the current state.
    Can someone help me figure out a way to make this work?
    Thanks for any help!
    Renee

    In response to what you say here: " I tried to access the custom component as a child of the navigator content component, but it tells me there are zero elements, so I don't know how to dispatch the event to my custom component given this situation."
    I've just come across something like this - when I try to populate my NavigatorContent, the children do not display and I had trouble accessing existing children.
    http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+DOM+Tree+API
    Specifically, I think this is the most relevant passage:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    What this means is that even though it looks like Panel's children should be a button, a label, and a checkbox; it's only real child is a panel skin instance. And the button, label, and checkbox get pushed down to become children of the contentGroup in the skin file. There are a few ways to access the Button in the panel: myPanel.getElementAt(0) or myPanel.contentGroup.getElementAt(0) or myPanel.skin.contentGroup.getElementAt(0).
    All SkinnableComponent's have a skin property. In an SkinnableContainer, the children of the components are actually pushed down to the skin's contentGroup. The component tree refers to the semantic tree translated from MXML. In the Panel example, this would just include, the Panel and its children: a button, a label, and a checkbox. The layout tree refers to the actual tree seen by the layout system, the layout tree due to skinning. In the Panel example, this would include the panel, the panel skin, all the panel skin's children, and all the panel's children that are actually pushed down into the contentGroup of the panel skin.
    The layout tree doesn't necessarily correlate to the display list tree that Flash sees. This is because GraphicElements are not innately display objects. Because of performance reasons, they implement display object sharing to minimize the number of display objects.
    IVisualElementContainer is the interface that defines the content APIs. In Spark, Skin, Group, and SkinnableContainer are the components for holding visual elements and implement this interface. To provide consistency, MX's Container will also implement this interface and just be a facade for addChild(), numChildren, etc....
    So, for example, you might want to try and access your custom component like this:
    MyNavContentContainer.skin.contentGroup.getChildByName("myComponent")
    Also, in order to get my new child components to display, I have set the creationPolicy of my ViewStack to:
    creationPolicy="all"
    This means that the NavigationContent containers are drawn at startup and not only when required.
    I'm not sure how relevant this is for you but it's info nevertheless - maybe it'll help.

  • Regarding at selection screen event

    hi experts,
                   i m working on hr abap report with the help of pnp ldb i made my selection screen using report category 'PY_DEF'  now what i want that i m not using the first selction screen which contains current period  details etc but when i click on the payroll period button the second selection screen is coming no doubt... containing payroll area current period ,other periods etc here i m entering payroll area eq 'ka' and  other periods from '012006' to '122006' ,,here i want to validate the user input that it sud be of one year that is from 1 to 12.....for this i know i will use at selection event but how can i use it for the second selection screen not for first screen......... plz help me....

    Do u realy need the first selection screen having the current period? If u don't need then u can hide the field in the report category, by passing only the payroll area with other period, in this case we can validate through selection screen..
    Reward points ... if found helpful...
    Regards,
    Sowmen Das

  • Regarding generating levels in the parent-child relationship--- using BODS

    Hi Experts,
    I got a problem in generating the level for the child attribute at which it stands in the hierarchy. I have 2 columns in my input file one for parent_no and other for child_no. I need to generate the level of the child_no in the total hierarchy structure. I used vertical hierarchical_flattening but it is not generating the requied output, it is generating the tree structure for each and every node in the hierarchy.
    What I need is my output file must contain the same number of rows as the input file and it must have an added column to it showing the level the child_no is in the hierarchy.
    Kindly, give me some suggessions for aquiring the same.
    Thanks in advance.
    Edited by: Sudheer_157 on Jul 20, 2009 9:21 AM

    Hi SubhadipRoy, I think you might need to create a procedure for this task.
    Because in SSIS, we cannot directly get the Identity ID.
    As my experience, there were serveral ways to do. But all are workaround.
    So, My suggestion is.
    In SSIS:
    1. Create a DataFlow
    2. Drag a flat source and load the data from dat file
    3. Create a procedure which receive the parameter from your data of each row.
    4. Drag a OLEDBCommand to the Panel and Invoke the Procedure also don't forget to pass all your rows to the Procedure in OLEDBCommand control.
    5. In Procedure, after insert 1 row you could get the Identity ID throuth SCOPE_IDENTITY()
    That's it, hope it works for you even this may not the efficency way.
    Althrough, I expect someone can give the best way if there is.

  • Tree component events

    Given there is no tree component in Flash CS3, I used the following tutorial http://developer.yahoo.com/flash/astra-flash/tree/ and managed to populate the tree from an xml file.  However I am now finding it difficult to perform certain actions such as:
    - adding/deleting items from the tree
    - save tree back to xml format
    - copy child nodes from one tree to another
    Can someone help me please, as I've been going round in circles this whole day without success

    try making changes to the underlying data itself (ie the xml) rather than the tree
    look at the inherited public methods here: http://developer.yahoo.com/flash/astra-flash/classreference/com/yahoo/astra/fl/controls/Tr ee.html#methodSummary

  • Can't get show/hide event of child UI Component to fire

    I have 4 UI Components, each one inside the other (nested). If the "hide" event of Component 1 is fired, I'm expecting the other components hide events to also fire, but they don't. So for example:
    + Component 1
    +> Component 2
    ++> Component 3
    +++> Component 4
    Is this the correct behaviour? If so, is it possible to do what I'm trying to do any other way?

    Thanks for clarifying. I think I found a way to do it. Adding in each child component:
    protected function initComp():void
        parentDocument.addEventListener(FlexEvent.SHOW, myShowMethod);
        parentDocument.addEventListener(FlexEvent.HIDE, myHideMethod);
    By rights hiding the parent component will cause a chain reaction, firing the hide event handlers on the child components too.

Maybe you are looking for