Action Event Handler on Tree nodes

I have an actionListener event handler registered on a tree node as follows:
<af:tree value="#{bindings.SomeViewObj1.treeModel}" var="node" rowSelection="none" id="t1"
binding="#{EditFormBean.tree1}" displayRow="selected" summary="Tree"
partialTriggers=":::cb1 :::cb2">
<f:facet name="nodeStamp">
<af:panelGroupLayout id="pgl3">
<af:outputText value="#{node}" id="ot1"/>
<af:commandImageLink text="E" id="cil3" partialSubmit="true"
*actionListener="#{EditFormBean.onEdit}"* binding="#{EditFormBean.cmdImageLink}">
<af:setPropertyListener from="#{node.hiertType.structureDefName}" type="action"
to="#{viewScope.formView}"/>
<f:attribute name="node" value="#{node}"/>
</af:commandImageLink>
<af:commandImageLink text="A" id="cil1"/>
<af:commandImageLink text="D" id="cil2"/>
</af:panelGroupLayout>
</f:facet>
</af:tree>
I have at each node stamp facet a panelGroup Layout that contains the node value and a command Image link. The tree has two hierarchical levels. When I press the command Image link on the first tree noe level, the actioListener method in teh managed bean (EditFormBean.onEdit) gets called. When I press the same commandImage link on the second tree level, the same action listener does not get called. I need to get past this problem before I code the actionListener which needs to set the current row in the iterator based on the key selected on the tree node. I simply have a print statement in the action listener method which shows something when the first level command image link is clicked but does not print anything when the second level command image link is clicked.
I am using JDeveloper 11.1.2.1.0
There is also adf faces code around this snippet that uses an af:switcher facea component to display the appropriate form based on the nodee level in which the comman d image link is clicled but it is irrelevant to the problem I am getting.
Any help on that would be appreciated

Hi,
hard to say . Didn't see this before. Can yoiu remove "binding="#{EditFormBean.cmdImageLink}"" from the command link. The tree stamps its children so that it doesn't make sense to keep a handle to the component instance
Frank

Similar Messages

  • How to pass params to Action Event handler in treeNode?

    Trying to use Tree in portlet I found impossible to determine selected node. (bug # 6354989).
    But I can (despite what is written in manual) use Action Event Handler. It works now (at least, I hope so).
    But I generate tree dynamically and cannot write event handlers for all its nodes. May be there's a way to write one event handler but distinguish node that triggered it? May be by passing additional params to handler?

    The tree component does not work well in portlets. This is a known problem.
    It uses cookies to pass the value of the selected node, but cookies do not work inside of portlets. So, the methods that would normally tell you which node is selected, return nothing. There are also no javascript properties which would allow you to output javascript to store the value somewhere in the page.
    Unfortunately there is no workaround for the bug you mentioned so far so far.
    Rose

  • Attaching an event to a tree node

    Hi there, hope to trigger a simple event when a tree node is click such as
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:XML id="treeData" xmlns="">
    <root>
    <node label="Section 1" >
    <node label="Section 1-1" >
    <node label="Section 1-1-1" click="lbl1.text='section 1-1-1';" />
    <node label="Section 1-1-2" click="lbl1.text='section 1-1-2';"/>
    <node label="Section 1-1-3">
    <node label="Section 1-1-3-1" />
    <node label="Section 1-1-3-2" />
    </node>
    <node label="Section 1-1-4" />
    </node>
    <node label="Section 1-2" >
    <node label="Section 1-2-1" />
    <node label="Section 1-2-2" />
    </node>
    </node>
    <node label="Section 2" >
    <node label="Section 2-1" >
    <node label="Section 2-1" />
    </node>
    </node>
    </root>
    </mx:XML> 
    <mx:Tree width="246" left="10" top="10" id="tree" labelField="@label" dataProvider="{treeData.node}" height="540"/>
    <mx:Label id="lbl1" x="395" y="155" text="Label1" width="151" />
    </mx:Application>
    The tree and its children were rendered properly on screen but clicking the relevant nodes didn't trigger the event. Please advise.
    Regards
    I F

    I didn't see a click handler in your code either.  Try adding itemClick
    though so you don't see clicks on scrollbars.
    <mx:Tree width="246" left="10" top="10" id="tree" labelField="@label"
    dataProvider="{treeData.node}" height="540" itemClick="trace(event)" /

  • Event Handling for tree structure using "CL_GUI_ALV_TREE_SIMPLE"

    Hi,
    I have created a tree structure using class CL_GUI_ALV_TREE_SIMPLE.
    Now I wanted to insert a check and give message when the user opens the last node in my structure.
    I checked the events available in the class , but there in none which gets trigered when we try to open a node.
    Please guide me with this scenario.
    Thanks & Regards,
    Omkar M.

    Hello Omkar
    The solution is somewhat odd but apparently works. As sample report please check BCALV_TREE_SIMPLE_DEMO.
    Copy this report and make the following changes:
    class lcl_tree_event_receiver definition.
      public section.
        methods:
        on_expand_no_children " new event handler method
          for event expand_no_children of cl_gui_column_tree
            importing NODE_KEY,  " class = CL_GUI_COLUMN_TREE !!!
        on_add_hierarchy_node
                  for event on_add_hierarchy_node of cl_gui_alv_tree_simple
                        importing grouplevel
                                  index_outtab.
    endclass.
    CLASS lcl_tree_event_receiver IMPLEMENTATION.
      METHOD on_expand_no_children.
        BREAK-POINT.
      ENDMETHOD.                    "on_expand_no_children
    FORM register_events.
    * define the events which will be passed to the backend
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event.
    * define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      APPEND l_event TO lt_events.
      CALL METHOD tree1->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
    * set Handler
      DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
      CREATE OBJECT l_event_receiver.
      SET HANDLER l_event_receiver->on_add_hierarchy_node
                                                            FOR tree1.  " CL_GUI_ALV_TREE_SIMPLE
      SET HANDLER l_event_receiver->on_expand_no_children
                                              FOR ALL INSTANCES. " CL_GUI_COLUMN_TREE !!!
    ENDFORM.                               " register_events
    As soon as you open a node in the ALV tree the report will stop at the break-point.
    Now you need to check if there are still children nodes to be displayed.
    If not then trigger your special coding.
    Regards
      Uwe

  • My action event handler isn't being invoked when I activate a button

    The button is of type 'submit' and I have an event handler defined in my Page bean, but it isn't getting called.

    Do you have a message group component on your page? There might be a validation or some other error that is preventing the action.

  • Event Handling in Tree structure

    Hi all,
      I have created an alv tree structure using the FM's 'RS_TREE_CONSTRUCT' and  'RS_TREE_LIST_DISPLAY'. Can anyone tell me how to handle double-click event with these FM's. My requirement is that i should display the tree structure of the Materials from Raw material till Finished materials and i have done that. After that, when i select one of these materials (Either double-click or provide some icon for each item and select that icon), i should be able to call an existing report with the data of the line selected.
    Any help will be greatly appreciable.
    thanks and regards,
    Raja Sekhar.

    Hi Raja..
    This post was from long back..
    And today i have same requirement.. So could you tell me that what you have done for this...
      Thanks in Advace

  • Tree and Tree Node Components - Threadinar7

    Hi All,
    This is the seventh in the "Threadinar" series , please see Threadinar6 at
    http://forum.sun.com/jive/thread.jspa?threadID=100601 for details
    In this Threadinar we will focus on the
    "Tree" and "Tree Node" Components
    Let us begin our discussion with the Tree Component.
    Tree Component
    You can drag the Tree component from the Palette's Basic category to the Visual Designer to create a hierarchical tree structure with nodes that can be expanded and collapsed, like the nodes in the Outline window. When the user clicks a node, the row will be highlighted. A tree is often used as a navigation mechanism.
    A tree contains Tree Node components, which act like hyperlinks. You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page. You set Tree Node properties in the Tree Node Component Properties window.
    * If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages.
    * Events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    Initially when you drop a tree on a page, it has one root node labeled Tree and one subnode labeled Tree Node 1. You can add more nodes by dragging them to the tree and dropping them either on the root node to create top level nodes or on existing nodes to create subnodes of those nodes. You can also right-click the Tree or any Tree Node and choose Add Tree Node to add a subnode to the node.
    Additionally, you can work with the component in the Outline window, where the component and its child components are available as nodes. You can move a node from level to level easily in the Outline window, so you might want to work there if you are rearranging nodes. You can also add and delete tree nodes in the Outline window, just as in the Visual Designer.
    The Tree component has properties that, among other things, enable you change the root node's displayed text, change the appearance of the text, specify if expanding or collapsing a node requires a trip to the server, and specify whether node selection should automatically open or close the tree. To set the Tree's properties, select the Tree component in your page and use the Tree Component Properties window.
    The following Tutorial ("Using Tree Component") is very useful to learn using Tree components
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sitemaptree.html
    See Also the Technical Article - "Working with the Tree Component and Tree Node Actions"
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/tree_component.html
    Tree Node Component
    You can drag the Tree Node component from the Palette's Basic category to a Tree component or another tree node in the Visual Designer to create a node in a hierarchical tree structure, similar to the tree you see in the Outline window.
    The tree node is created as a subnode of the node on which you drop it. If you drop the node on the tree component itself, a new node is created as a child of the root node. You can see the hierarchical structure clearly in the Outline window, where you can also easily move nodes around and reparent them.
    You can also add a tree node either to a Tree component or to a Tree Node component by right-clicking the component and choosing Add Tree Node.
    A Tree Node component by default is a container for an image and can be used to navigate to another page, submit the current page, or simply open or close the node if the node has child nodes.
    * If you select the Tree Node component's node Tree Node icon in the Outline window, you can edit its properties in the Tree Node Properties window. You can set things like whether or not the Tree Node is expanded by default, the tooltip for the Tree Node, the label for the tree node, and the Tree Node's identifier in your web application.
    * You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page.
    - Note: If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages. In addition, events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    * If you select the image in the Tree Node, you can see that its icon property is set to TREE_DOCUMENT. If you right-click the image on the page and choose Set Image, you can either change the icon to another one or choose your own image in the Image Customizer dialog box. For more information on working with an image in a tree node, see Image component.
    - Note: The image used in a tree node works best if it is 16x16 or smaller. Larger images can work, but might appear overlapped in the Visual Designer. You can right-click the component and choose Preview in Browser feature to check the appearance of the images.
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    One challenge I had experience was to make the tree
    always expanded on all pages (I placed my tree menu
    in a page fragment so I can just import it in my
    pages).Did you solve this problem. It would be interesting to know what you did.
    To expand a node you call setExpanded on the node. Here is some code from a tutorial that a coworker of mine is working on.
    In the prerender method:
           Integer expandedPersonId = getRequestBean1().getPersonId();
             // If expandedPersonId is null, then we are not coming back
            // from the Trip page. In that case we do not want any trip
            // nodes to be pre-selected (highlighted) due to browser cookies.
            if (expandedPersonId==null) {
                try {
                    HttpServletRequest req =(HttpServletRequest)
                    getExternalContext().getRequest();
                    Cookie[] cookies = req.getCookies();
                    //Check if cookies are set
                    if (cookies != null) {
                        for (int loop =0; loop < cookies.length; loop++) {
                            if (cookies[loop].getName().equals
                                    ("form1:displayTree-hi")) {
                                cookies[loop].setMaxAge(0);
                                HttpServletResponse response =(HttpServletResponse)
                                getExternalContext().getResponse();
                                response.addCookie(cookies[loop]);
                } catch (Exception e) {
                    error("Failure trying to clear highlighting of selected node:" +
                            e.getMessage());
            }                  ... (in a loop for tree nodes)...
                      personNode.setExpanded(newPersonId.equals
                                    (expandedPersonId));In the action method for the nodes:
           // Get the client id of the currently selected tree node
            String clientId = displayTree.getCookieSelectedTreeNode();
            // Extract component id from the client id
            String nodeId = clientId.substring(clientId.lastIndexOf(":")+1);
            // Find the tree node component with the given id
            TreeNode selectedNode =
                    (TreeNode) this.getForm1().findComponentById(nodeId);
            try {
                // Node's id property is composed of "trip" plus the trip id
                // Extract the trip id and save it for the next page
                Integer tripId = Integer.valueOf(selectedNode.getId().substring(4));
                getRequestBean1().setTripId(tripId);
            } catch (Exception e) {
                error("Can't convert node id to Integer: " +
                        selectedNode.getId().substring(4));
                return null;
    It would also be great if I can set the tree
    readonly where the user cannot toggle the expand
    property of the tree (hope this can be added to the
    tree functionality).

  • Checking if user has selected or deselected a tree node

    Hello,
    In the event handler of the On Action event of a tree node, I need to decide whether the user has selected the element or deselected it.
    I thought to use the following:
    data:  lo_node type ref to if_wd_context_node,
             lo_element type ref to if_wd_context_element,
             l_element_selected type abap_bool.
    first I tried
    * need to find out if this element was selected or deselected!
      l_element_selected = context_element->is_selected( ).
    but it didn't work - so I tried
    lo_node = context_element->get_node( ).
      lo_element = lo_node->get_lead_selection( ).
      if lo_element = context_element.
        l_element_selected = abap_true.
      else.
        l_element_selected = abap_false.
      endif.
    This did work.
    I'm slightly confused as to why the two did not give the same result?
    I can see in the implementation why - gotta love being able to see how the engine works - but why is the node selection table not set? For future reference, is there some flow that has to happen before the selection gets set but after the lead selection is made? Or is this just an error in the handling of the tree node element?
    Cheers,
    Chris

    One would wonder why there is no is_Lead_Selected method. Having just the is _ Multi_  Selected method is quite confusing. Especially when the method description is "True, if element is selected in the node". One would assume that this would include lead selection.
    Then again - when you consider the mismatch between methods that return values and methods that export values, this lack of a is_Lead_Selected method would be low down on my list of things to fix to make WDA more consistent.
    Having Get_Static_Attributes return the data rather than export it would be much higher on my list - ( get_static_attributes_ref does actually return the reference to the data - talk about inconsistent! )

  • How to run a form using tree node selection??

    hi...
    i have populated a tree with all the form name.There is a particular id for every form.i want to show a form using tree node selection.What i did...i write a trigger in button's click event when the tree node is selected then i get a id.if id=1 then open_form('test.fmx').when i want to execute this code then it is showing the same form 2 times.Can anyone help me to solve my problem?If so plz tell me what code i have to write to show a form using node selection?.

    I've done the same thing, and i think it works fine.
    Check this code (Sorry for the long post, but i cannot find how to attach files.
    PACKAGE menu_pk IS
    --Initialization of the menu.
    procedure Init;
    --Called from WHEN-TREE-NODE-EXPANDED
    procedure Expanded;
    --Called from WHEN-TREE-NODE-ACTIVATED
    procedure ExecuteCommand;
    END;
    PACKAGE BODY menu_pk IS
    MENU_NAME constant varchar2(30) := 'menu.menu';
    cursor c_menu(pRoot in varchar2) is
    select apm_code, apm_parcode, apm_descr, decode(apm_type, 0, Ftree.EXPANDED_NODE, Ftree.LEAF_NODE) apm_type,
    decode(apm_type, 0, 'menu', 1, 'form', 2, 'report') || '.ico' apm_icon
    from app_menu
    where apm_parcode = pRoot
    order by apm_code asc;
    procedure Init is
         new_node ftree.node;
    begin
         for i in c_menu('root')
         loop
    new_node := Ftree.add_tree_node(MENU_NAME, FTree.ROOT_NODE,
    Ftree.PARENT_OFFSET, Ftree.LAST_CHILD,
    i.apm_type, i.apm_descr, i.apm_icon, i.apm_code);
         end loop;
    end;
    procedure FillNode(pNode in FTree.Node) is
         new_node ftree.node;
    begin
         for i in c_menu(FTree.get_tree_node_property(MENU_NAME, pNode, FTree.NODE_VALUE))
         loop
    new_node := Ftree.add_tree_node(MENU_NAME, pNode,
    Ftree.PARENT_OFFSET, Ftree.LAST_CHILD,
    i.apm_type, i.apm_descr, i.apm_icon, i.apm_code);
         end loop;
    end;
    procedure DeleteNodeChilds is
    node FTree.NODE;
    begin
         loop
    node := FTree.Find_Tree_Node(MENU_NAME, '',
         FTree.FIND_NEXT_CHILD, FTree.NODE_VALUE,
         name_in('system.trigger_node'), name_in('system.trigger_node'));
              exit when Ftree.ID_NULL(node);
              FTree.delete_tree_node(MENU_NAME, node);
         end loop;
    end;
    procedure Expanded is
    begin
         if (FTree.GET_TREE_NODE_PROPERTY(MENU_NAME, :system.trigger_node, FTree.Node_State) = FTree.EXPANDED_NODE) then
         menu_pk.FillNode(name_in('system.trigger_node'));
         else
              menu_pk.DeleteNodeChilds;
         end if;
    end;
    procedure ExecuteCommand is
    cursor c_command(pCode in varchar2) is
    select apm_form, apm_type
    from app_menu
    where apm_code = pCode;
    fCommand c_command%rowtype;
    fMenuCode varchar2(20);
    begin
         -- if it is as menu node then exit.
    if (not FTree.Get_Tree_Node_Property(MENU_NAME, :system.trigger_node, FTree.NODE_STATE) = FTree.LEAF_NODE) then
         return;
    end if;
    fMenuCode := FTree.Get_Tree_Node_Property(MENU_NAME, :system.trigger_node, FTree.NODE_VALUE);
         open c_command(fMenuCode);
         fetch c_command into fCommand;
         close c_command;
         if (fCommand.apm_type = 1) and (fCommand.apm_form is not null) then
              globals.Set_MenuChoice(fMenuCode);
              OPEN_FORM(fCommand.apm_form);--, ACTIVATE, SESSION);
         end if;
    end;
    END;
    The menu table definition follows.
    create table APP_MENU
    APM_CODE VARCHAR2(10) not null,
    APM_PARCODE VARCHAR2(10) not null,
    APM_DESCR VARCHAR2(40) not null,
    APM_TYPE NUMBER(1) not null,
    APM_FORM VARCHAR2(50)
    alter table APP_MENU
    add constraint APP_MENU_PRI primary key (APM_CODE);
    Hope this helps

  • Confirmation Dialog when clicking on Tree Node.

    I am working on Oracle Apex 4.2.0.00.27 and I have the following problem:
    The code below shows the definition of a tree. The tree displays records from the table ACTIVITIES in hierarchical structure.
    When user clicks on a leaf/node of the tree he will be redirected to another page where the details of each Activity/leaf/node are displayed.
    The tree is part of a page where I have established a functionality to check for changes on the input fields of the page and inform the user when he tries to redirect without first saving the changes he made.
    What I want to do is:
    WHEN user clicks on a node of the tree AND he hasn't saved any changes he made
    THEN
    trigger a confirmation dialog.
    IF
    he clicks OK he is redirected to the node details page as defined on the tree definition:
    f?p=&APP_ID.:10:'||:APP_SESSION||'::::P10_ID:'||"ID"
    ELSE if he clicks CANCEL
    he stays on the same page.
    The condition to trigger the confirmation box is:
    if (document.getElementById('P0_CHANGES_DETECTED').value == 1)
    where P0_CHANGES_DETECTED is a universal hidden text field that is set to +'1'+ every time a change is made.
    and here is the tree definition:
    select case when connect_by_isleaf = 1 then 0
    when level = 1             then 1
    else                           -1
    end as status,
    level,
    +"NAME" as title,+
    null as icon,
    +"ID" as value,+
    null as tooltip,
    decode(PARENT_ID,null,null, 'f?p=&APP_ID.:10:'||:APP_SESSION||'::::P10_ID:'||"ID") as link
    from "#OWNER#"."ACTIVITIES"
    where GROUP_ID = :P20_GROUP_ID
    start with "ID" in (select ID from "#OWNER#"."ACTIVITIES" where GROUP_ID = :P20_GROUP_ID and PARENT_ID is null)
    connect by prior "ID" = "PARENT_ID"
    order siblings by "ID"
    I hope it is clear what I want to achieve. Thanks in advance.

    So you'll want to bind an event to all tree nodes that checks for the value and then fires the confirmation if there value is 1.
    Try something like this:
    - first, give your static ID attribute in your tree the value of tree_static_id (or whatever you want. just replace the id selector below with what you choose).
    - In your Page Function and Variable Declaration Javascript:
    function confirmSave() {
    var changeDetected = jQuery('#P0_CHANGES_DETECTED').val();
    if(changeDetected == 1) {
    //only do this if change is detected
    if(confirm('You have unsaved changes. Do you want to leave this page?')) {
    window.location('[your url here]');
    jQuery(document).ready(function() {
    //bind function to the click event
    $('#tree_static_id').find('li a').bind('click', function() { confirmSave(); } });
    });Hope this helps

  • OnMouseClicked event handler not working

    I'm currently playing with Netbeans 7.0 and JavaFX 2.0-beta (Java 1.6.0_26, OS Windows XP) and noticed, that the onMouseClicked event handler doesn't seem to work properly.
    I added one to the scene but it got triggered only very sporadical, when I hit the mouse button several times really fast. The onMousePressed and onMouseReleased handlers on the other side work as expected.
    I also tried adding a click event handler to other nodes like a Rectangle or a Pane but it's always the same behaviour.
    Is this a (known) bug or limitation of the beta release or am I missing something here?
    Here is a a short example:
    public void start(Stage primaryStage) {
            primaryStage.setTitle("JavaFX");
            final BorderPane root = new BorderPane();
            final Scene scene = new Scene(root, 800, 600, Color.BLACK);
            scene.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent event) {
                    System.out.println("click");
            primaryStage.setScene(scene);
            primaryStage.centerOnScreen();
            primaryStage.setVisible(true);
    }Regards,
    Kai
    Edited by: 865264 on 11.06.2011 13:29 (thanks for the tip, Darryl)

    To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
    Don't forget to read the announcements at the top of the forum listing and the FAQ linked from every page so you'll know how to format your code correctly.

  • WebDynpro ABAP tree node collapse trigger event of row selection

    Hello expert,
    I have a table in my WD abap view, I use MasterColumn to display the tree structure, everything works just fine.
    However I encounter one problem:
    If I open the tree structure and select one node (table row selection), the event onLeadSelectis triggered, this is correct. However if I collapse any  parent nodes (along the tree path) of the selected node, WD puts the selection on the clicked parent and thus the event onLeadSelect is triggered for the parent. This is a strange behavior, because when I collapse a node, I certainly don't want to trigger the onLeadSelect event for the node, becaseu this would invoke the function linked to the event which is only supposed to be triggered when you explicitly select the table row.  (BTW, if you don't select any child nodes, then collapse the parent, it does NOT trigger the event).
    I've looked into the wdevent data to see if I can differentiate between the event of node collapsing and row selecting, event data is exact same for both cases, thus I have no way to stop the event handler in case of node collapsing.
    Anyone had this issue and a solution for this?
    Thanks
    Jayson

    Hi Jayson,
    Its the behavior of the tree element, the lead selection of child is carried over to the parent.
    Whenever there is lead selection set and on toggling of tree node, first OnToggle event triggers and then OnLeadSelect triggers. So you can control the execution of onLeadSelect by using EXPANDED parameter of event OnToggle.
    Please refer the below steps:
    Create an action ON_TOGGLE for the vent OnToggle of tree element and it will be having parameter EXPANDED
    Create an attribute in view-->attributes tab GV_EXPANDED
    Collect the parameter EXPANDED into gv_expanded
              wd_this->gv_expanded = expanded.
    Now, you can use wd_this->gv_expanded to control the execution of LEADSELECT logic
    Hope this helps you.
    Regards,
    Rama

  • How to handle check box events in alv tree.

    hi,
    i am working in CL_GUI_COLUMN_TREE class.Also using Check box. Now i want to handle events for check box . I am new to ABAP Objects.
    Pls expaline in detail or send code
    thanks in advance,
    senthil kumar.r

    Hello Senthil
    Have a look at the sample report
    SAPCOLUMN_TREE_CONTROL_DEMO
    . The crucial points are:
    <b>(1) Register the required events at the control</b>
    * define the events which will be passed to the backend
      " checkbox change
      event-eventid = CL_GUI_COLUMN_TREE=>EVENTID_checkbox_change.
      event-appl_event = 'X'.
      append event to events.
      CALL METHOD G_TREE->SET_REGISTERED_EVENTS
        EXPORTING
          EVENTS = EVENTS
        EXCEPTIONS
          CNTL_ERROR                = 1
          CNTL_SYSTEM_ERROR         = 2
          ILLEGAL_EVENT_COMBINATION = 3.
      IF SY-SUBRC <> 0.
        MESSAGE A000.
      ENDIF.
    <b>(2) Set the event handler</b>
    assign event handlers in the application class to each desired event
      SET HANDLER G_APPLICATION->HANDLE_CHECKBOX_CHANGE FOR g_tree.
    <b>(3) Define and implement event handler method</b>
      METHOD  HANDLE_CHECKBOX_CHANGE.
        " this method handles the checkbox_change event of the tree
        " control instance
        " show the key of the node and the name of the item
        " of the clicked checkbox in a dynpro field
        G_EVENT = 'CHECKBOX_CHANGE'.
        G_NODE_KEY = NODE_KEY.
        G_ITEM_NAME = ITEM_NAME.
        CLEAR  G_HEADER_NAME.
      ENDMETHOD.
    Regards
      Uwe

  • Event handler for disclosureopenicon in tree in flex 4

    hi all,
              Is it possible to write event handler to disclosureopenicon for tree control in flex?
    if its possible means, h w can i write?

    Hi Ananth,
    You can do this by firing a Navigation event for Opening and closing of these tree nodes.
    Cheers,
    Jeevan

  • Tree's DragSource changes at DragDrop event handler?

    I try to drag a node A into node B. When the DragDrop event
    handler is called, the dragSource is changed to the drop source?
    I have declared the following:
    <mx:Tree ......... dragDrop="OnDragDrop(event)"....../>
    In the function:
    private function OnDragDrop( event:DragEvent ):void
    var ds:DragSource = event.dragSource;
    items = new XML( ds.dataForFormat("treeItems")[0] );
    I was expecting the "items" has a copy of the dragged item
    (node A). However, it has all the drop node's info (node B). How do
    I get teh drag and drop nodes in this event?
    P.S. I am trying to drag and drop at the same tree control.
    Could that be why? Is it suppose to be like this? Or, its a bug?
    -Alan

    Regarding your button look and feel issue, the easiest thing to do would be to copy the button template you are using for the template-based buttons and modify that to add in your onClick handlers.
    The builtin button template for the theme I am using (Theme 12) looks like this
    <table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="">
        <tr>
            <td class="t10L"><img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /></td>
            <td class="t10C">#LABEL#</td>
            <td class="t10R"><img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /></td>
        </tr>
    </table>In other words, each button is rendered in its own HTML table.
    Copy this button template, call it mybutton and have it look like
    <table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="">
        <tr>
            <td class="t10L"><img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /></td>
            <td class="t10C">#LABEL#</td>
            <td class="t10R"><img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /></td>
        </tr>
    </table>Notice that I put a no-op in the href tag for the button and added a onClick handler that will do the real work. In your case, you would use the URL Redirect on the Button attributes page to call your SavePage() function. Since the onClick is called before the href, it should (hopefully) do what you are looking for.
    I put up these changes at
    http://htmldb.oracle.com/pls/otn/f?p=24317:26
    Do let us know.
    Thanks

Maybe you are looking for

  • How to invoke a web service asynchronously using ws-addressing model?

    Hi Gurus, We are invoking an external web service asynchronously using Oracle Work Flow Business events using the following mechanism - 1)Created a web service invoker event to invoke the web service. 2)Created a subscription that invokes the web ser

  • In Photoshop Elements 7, how do I free up the ends of a crop box independently?

    In Photoshop Elements 7, how do I free up the ends of a crop box independently? I require the end points to move independently to fit am image crop

  • Widget/Button image

    Hello, I have a problem with Button Widget. I decided to insert a rollover slidelet and on this slidelet I would like to have a button. The only way to insert button is to insert Widget and than select a button. I did it and now I would like to chang

  • Listing log file in dd_mm_yy.txt format

    Hi everyone, I want to list log files whose names are changing daily in command line. Like that;  C:\log\dd_mm_yy.txt  "dd_mm_yy.txt" is changing daily. What kind of a definition I must use in Windows command prompt to list the log file ? Could you p

  • Saving textpane wrapped in htmleditorkit to an html file

    Hey, Do any of you people know what I am doing wrong with the following code? It will not take the typed text, convert it to html code, and save it as an html file. The file saves properly, but it is just blank w/ no text and such. please help