Tree and event

How can I know the node on mouse move ?
How can I croll a tree in programm ?
How can I show a particular node in programm ?

I just ran into a similar problem today with an ADF table. I tracked it down to a hidden input component in the generated HTML named "event". To verify that this reference was being passed in place of the actual event object, I renamed the component when the page was loaded, After that events came in as normal. The problem then was that the browser showed the page loading forever after a table range change.
Has anyone ever run across this one?

Similar Messages

  • I keep losing entire events in iPhoto on my iMac.  Where an event was, there is a light gray event box displaying a dark gray palm tree and when I hover my cursor over the box, it shows 0 photos are there, where there were once photos.

    I keep losing entire events in iPhoto on my iMac.  Where an event was, there is a light gray event box displaying a dark gray palm tree and when I hover my cursor over the box, it shows 0 photos are there, where there were once photos.  I am operating a 27 inch iMac running OS X 10.9.4.  It has a 2.7 GHz Intel Core i5 processor, and its memory is 4GB 1333 MHz DDR3.  Is there any way to retrieve the lost photos?

    WHat version if iPhoto?  Where is your iPhoto library located?
    TRy
    BAckup your iPhoto library, depress and hold the option and command keys while launching iPhoto until the first aid window comes up and repair permissions and if necessary rebuild your database
    LN
    Edit

  • Sharing Events/Handlers for Tree and List

    I have a Tree component and a List component that both share
    very similar functionality. In particular, I have setup
    functionality to edit the labels in each component only when I
    trigger a custom event from a ContextMenu, preventing the default
    action of editing the item when it is selected.
    Since Tree extends List, I was wondering if there was some
    easy way to make a Class/Component that could contain all the logic
    for this functionality that could be shared across Tree and List
    (or any List-based) components.
    I'm basically trying to avoid duplicating code.
    Any thoughts/suggestions?
    Thanks!

    "ericbelair" <[email protected]> wrote in
    message
    news:ga8h3q$9pn$[email protected]..
    >I have a Tree component and a List component that both
    share very similar
    > functionality. In particular, I have setup functionality
    to edit the
    > labels in
    > each component only when I trigger a custom event from a
    ContextMenu,
    > preventing the default action of editing the item when
    it is selected.
    >
    > Since Tree extends List, I was wondering if there was
    some easy way to
    > make a
    > Class/Component that could contain all the logic for
    this functionality
    > that
    > could be shared across Tree and List (or any List-based)
    components.
    >
    > I'm basically trying to avoid duplicating code.
    >
    > Any thoughts/suggestions?
    I think what you're looking for is called "monkey patching",
    which involves
    putting a file of the same name and directory structure in
    your project as
    the original was in the Framework. I don't know much more
    about it than
    that, though.

  • Report with ALV tree and ALV list?

    I need to create a report with layout as same as this one
    [http://trangiegie.com/MyFile/output.JPG]
    It looks like a report with combination of ALV tree and list. The tree works like a navigation bar. Wonder if there are any demo programs like this. Will appreciate any help.

    For Tree alone - You can check program : BCALV_TREE_02
    Program Name                   Report title
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    BCALV_TEST_SIMPLE_TREE         Program BCALV_TEST_SIMPLE_TREE
    BCALV_TREE_01                  ALV Tree Control: Build Up the Hierarchy Tree
    BCALV_TREE_02                  ALV Tree Control: Event Handling
    BCALV_TREE_03                  ALV Tree Control: Use an Own Context Menu
    BCALV_TREE_04                  ALV Tree Control: Add a Button to the Toolbar
    BCALV_TREE_05                  ALV Tree Control: Add a Menu to the Toolbar
    BCALV_TREE_06                  ALV tree control: Icon column and icon for nodes/items
    BCALV_TREE_DEMO                Demo for ALV tree control
    BCALV_TREE_DND                 ALV tree control: Drag & Drop within a hierarchy tree
    BCALV_TREE_DND_MULTIPLE        ALV tree control: Drag & Drop within a hierarchy tree
    BCALV_TREE_EVENT_RECEIVER      Include BCALV_TREE_EVENT_RECEIVER
    BCALV_TREE_EVENT_RECEIVER01
    BCALV_TREE_ITEMLAYOUT          ALV Tree: Change Item Layouts at Runtime
    BCALV_TREE_MOVE_NODE_TEST      Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO         Program BCALV_TREE_SIMPLE_DEMO
    BCALV_TREE_VERIFY              Verifier for ALV Tree and Simple ALV Tree

  • Order of elements and events.

    INTRO
    Hi Oracle community.
    A while ago I started a thread here on the forum where I had put three different subjects to be treated. The user jsmith guided me saying that I was supposed to separate things, dividing each subject in a separate thread. The original discussion is at the following link:
    Interesting things, however, unknown? StackPane, animations and filters.
    ABOUT
    So in this discussion, I will be talking about input events and maybe about event filters. I created a JavaFX 8 (b123) application that checks the mouse click on certain nodes. Basically I have a panel of buttons. Behind this panel, I have a scroll pane with rectangles. The rectangles are contained within a Group, and the buttons are in a VBox. The Group is set as ScrollPane content. VBox and ScrollPane are within a StackPane, which becomes the root of scene graph. If we observe the nodes tree, we'll find the following scenario:
    IMAGE
    Here is my source code:
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.geometry.Pos;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Rectangle;
    import javafx.stage.Stage;
    public class ScrollTest extends Application
        //                                                                                                       MAIN
        public static void main(String[] args)
            Application.launch(args);
        //                                                                                                 INSTÂNCIAS
        // CONTROLS
        private Rectangle[] rectangles;
        private ScrollPane scrollP;
        private Button[] buttons;
        // LAYOUTS
        private StackPane root;
        private Group group;
        private VBox vbox;
        //                                                                                                  INÍCIO FX
        @Override public void start(Stage estagio) throws Exception
            this.iniFX();
            this.confFX();
            this.adFX();
            this.evFX();
            Scene cenario = new Scene(this.root , 640, 480);
            estagio.setScene(cenario);
            estagio.setTitle("Programa JavaFX - RDS");
            estagio.show();
        /** Just instantiate JavaFX objects.*/
        protected void iniFX()
            // CONTROLS
            this.rectangles = new Rectangle[5];
            this.scrollP = new ScrollPane();
            this.buttons = new Button[6];
            // LAYOUTS
            this.root = new StackPane();
            this.group = new Group();
            this.vbox = new VBox();
        /** Just sets the JavaFX objects.*/
        protected void confFX()
            // CONTROLS
            for(int count = 0 ; count < this.rectangles.length ; count++)
                this.rectangles[count] = new Rectangle();
                this.rectangles[count].setWidth(Math.random() * 100 + 20);
                this.rectangles[count].setHeight(Math.random() * 100 + 20);
                this.rectangles[count].setFill(Color.rgb((int) (Math.random() * 255) , (int) (Math.random() * 255) , (int) (Math.random() * 255)));
                this.rectangles[count].setTranslateX(Math.random() * 600);
                this.rectangles[count].setTranslateY(Math.random() * 600);
                this.rectangles[count].setRotate(Math.random() * 360);
            for(int count = 0 ; count < this.buttons.length ; count++)
                this.buttons[count] = new Button("Button - " + count);
            // this.scrollP.setVbarPolicy(ScrollBarPolicy.ALWAYS);
            // this.scrollP.setHbarPolicy(ScrollBarPolicy.ALWAYS);
            this.scrollP.setPrefSize(400 , 400);
            // LAYOUTS
            this.vbox.setAlignment(Pos.CENTER);
            this.vbox.setSpacing(20);
            // This doesn't solve my problem.
            // this.vbox.setMouseTransparent(true);
        /** Just create the realtion between nodes, and the root.*/
        protected void adFX()
            for(int count = 0 ; count < this.rectangles.length ; count++)
                this.group.getChildren().add(this.rectangles[count]);
            for(int count = 0 ; count < this.buttons.length ; count++)
                this.vbox.getChildren().add(this.buttons[count]);
            this.scrollP.setContent(this.group);
            this.root.getChildren().add(this.scrollP);
            this.root.getChildren().add(this.vbox);
        /** Just add some events to some nodes for debugging.*/
        protected void evFX()
            this.vbox.setOnMousePressed(new EventHandler<MouseEvent>()
                @Override public void handle(MouseEvent e)
                    System.out.println("Mouse pressed inside VBox.");
            this.scrollP.setOnMousePressed(new EventHandler<MouseEvent>()
                @Override public void handle(MouseEvent e)
                    System.out.println("Mouse pressed inside ScrollPane.");
            if(this.rectangles.length > 0)
                this.rectangles[0].setOnMousePressed(new EventHandler<MouseEvent>()
                    @Override public void handle(MouseEvent e)
                        System.out.println("Rectangle pressed.");
                        rectangles[0].setFill(Color.rgb((int) (Math.random() * 255) , (int) (Math.random() * 255) , (int) (Math.random() * 255)));
    THE PROBLEM
    I wish I could click the mouse on VBox buttons, but also in the scroll pane, and in it's internal contents (the rectangles). I tried changing the VBox mouseTransparent property to true, and modify mouseTransparent to false on each VBox button, but that did not work. I've been reading the JavaFX documentation talking about routing events, and found the following:
    The route can be modified as event filters and event handlers along the route process the event. Also, if an event filter or event handler consumes the event at any point, some nodes on the initial route might not receive the event.
    Could it be that VBox is filtering events so they do not reach ScrollPane? Or is this being done by StackPane in some other manner? Does anyone have any idea what I could do?
    In any case, I thank you for your attention.

    You might need to modify the event dispatch tree so that the events get beyond the VBox. I'm not saying this is the right thing to do, but something worth looking at.
    root.setEventDispatcher(new EventDispatcher() {
    @Override
    public Event dispatchEvent(Event event, EventDispatchChain tail) {
    tail.append(group.getEventDispatcher());
    return tail.dispatchEvent(event);
    There is some info on event processing at Handling JavaFX Events: Processing Events | JavaFX 2 Tutorials and Documentation

  • 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).

  • Tree and Table UI element with same data source (context)

    Hello,
    I am trying to build an application which shows an tree and an table UI which shows additional information to the selected tree node. (like Windows Explorer)
    I am using an context like this:
    Class - - - - - - - - --  (Mapped  value Node)
    - SubClass - - - - -  (Recursion Node)
    - id - - - - - - - - -- - -(Value attribute)
    - name - - - - - - - - -(Value attribute)
    For the tree I am unsing this event handler  
         public void onActionClassNodeSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, de.aequitas.sap.wd.java.easyclass.wdp.IPrivateEasyClassView.IClassElement element )
    wdModifyView contains this:
    public static void wdDoModifyView(IPrivateEasyClassView wdThis, IPrivateEasyClassView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
         IWDTable pictureTable = (IWDTable) view.getElement("PictureTable");
        if(firstTime)
             IWDTreeNodeType node = (IWDTreeNodeType) view.getElement("TreeNodeType");
             node.mappingOfOnLoadChildren().addSourceMapping("path", "element");
             node.mappingOfOnAction().addSourceMapping("path", "element");
    I think I could use now
    pictureTable.bindDataSource()
    , but do not know where to get the needed parameter.
    Thank You
    Bernd

    >
    Bernd Herbold wrote:
    > Hello,
    >
    > I am trying to build an application which shows an tree and an table UI which shows additional information to the selected tree node. (like Windows Explorer)
    >
    > I am using an context like this:
    > Class - - - - - - - - --  (Mapped  value Node)
    >  - SubClass - - - - -  (Recursion Node)
    >  - id - - - - - - - - -- - -(Value attribute)
    >  - name - - - - - - - - -(Value attribute)
    >  .
    >  .
    >  
    > For the tree I am unsing this event handler  
    >
         public void onActionClassNodeSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, de.aequitas.sap.wd.java.easyclass.wdp.IPrivateEasyClassView.IClassElement element )
    >  
    > wdModifyView contains this:
    >
    >  
    public static void wdDoModifyView(IPrivateEasyClassView wdThis, IPrivateEasyClassView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    >   {
    >     //@@begin wdDoModifyView
    >      IWDTable pictureTable = (IWDTable) view.getElement("PictureTable");
    >     if(firstTime)
    >     {
    >          IWDTreeNodeType node = (IWDTreeNodeType) view.getElement("TreeNodeType");
    >          node.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    >          node.mappingOfOnAction().addSourceMapping("path", "element");
    >     }
    >
    > I think I could use now
    pictureTable.bindDataSource()
    , but do not know where to get the needed parameter.
    >
    > Thank You
    > Bernd
    Hi,
    Following is the code to do this
    //Your existing code
    IWDTable pictureTable = (IWDTable) view.getElement("PictureTable");
    //use the following code for binding
    IWDNodeInfo nodeInfo = wdContext.nodeClass().getNodeInfo();// Assuming class Node is bound to table.
    pictureTable.bindDataSource(nodeInfo);
    Regards
    Ayyapparaj

  • 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

  • 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

  • Major tree and display issue.........

    Hi guys! I am having a problem whereby when I click on a tree node(Folder), I want all the images contained in that folder to be displayed on a JPanel which I created. By the way, the tree and panel are added to a splitpane. Tree on the right, and panel on the left. I will really appreciate it if someone can assist. Thanks a lot in advance!!
    Cheers,
    Bolo

    Hi,
    You see this demo, it displays all the images of a selected folder in the tree in the right panel. You can customize the layout of the right panel to suit your need.
    Regards,
    Pratap
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.tree.*;
    public class Frame1 extends JFrame implements TreeSelectionListener {
         JSplitPane jSplitPane1 = new JSplitPane();
         JScrollPane jScrollPane1 = new JScrollPane();
         JScrollPane jScrollPane2 = new JScrollPane();
         JTree tree = new JTree();
         JPanel panel = new JPanel();
         String dir = "d://images/";
         private static final FileSystemView fsv = FileSystemView.getFileSystemView();
         FlowLayout flowLayout1 = new FlowLayout();
         public Frame1() {
              try {
                   jbInit();
                   tree.setModel(new FileTreeModel(dir));
                   tree.setCellRenderer(new FileCellRenderer());
                   tree.addTreeSelectionListener(this);
              catch(Exception e) {
                   e.printStackTrace();
         public void valueChanged(TreeSelectionEvent e) {
              panel.removeAll();
              if (e.getNewLeadSelectionPath() == null){
                   panel.repaint();
                   return;
              File node = (File)e.getNewLeadSelectionPath().getLastPathComponent();
              if (node.isFile()) {
                   panel.repaint();
                   return;
              File []images = node.listFiles();
              try {
                   for (int i = 0; i < images.length; i++) {
                        String name = images.getName();
                        boolean image = name.endsWith(".gif") || name.endsWith(".jpg") || name.endsWith(".png");
                        if (!image) continue;
                        ImageIcon icon = new ImageIcon(images[i].toURL());
                        panel.add(new JLabel(icon));
                   panel.revalidate();
              catch (Exception ex) {
                   ex.printStackTrace();
         public static void main(String[] args) {
              Frame1 f = new Frame1();
              f.setSize(400,300);
              f.setLocation(200,200);
              f.show();
         private void jbInit() throws Exception {
              panel.setBackground(Color.white);
              panel.setLayout(flowLayout1);
              flowLayout1.setAlignment(FlowLayout.LEFT);
              this.getContentPane().add(jSplitPane1, BorderLayout.CENTER);
              jSplitPane1.add(jScrollPane1, JSplitPane.LEFT);
              jScrollPane1.getViewport().add(tree, null);
              jSplitPane1.add(jScrollPane2, JSplitPane.RIGHT);
              jScrollPane2.getViewport().add(panel, null);
         public class FileTreeModel extends DefaultTreeModel {
              File root;
              FileTreeModel(String dir)     {
                   super(null);
                   root = new File(dir);
              public Object getChild(Object parent, int index){
                   File p = (File)parent;
                   return p.listFiles()[index];
              public int getChildCount(Object parent)     {
                   File p = (File)parent;
                   return p.listFiles().length;
              public int getIndexOfChild(Object parent, Object child)     {
                   File f [] = ((File)parent).listFiles();
                   for (int i = 0; i < f.length; i++) {
                        if (f[i] == child) return i;
                   return 0;
              public Object getRoot()     {
                   return root;
              public boolean isLeaf(Object node){
                   return ((File)node).isFile();
         public class FileCellRenderer extends DefaultTreeCellRenderer {
              public Component getTreeCellRendererComponent(JTree tree,
                                                           Object value,
                                                           boolean selected,
                                                           boolean expanded,
                                                           boolean leaf,
                                                           int row,
                                                           boolean hasFocus) {
                   super.getTreeCellRendererComponent(tree, value,selected, expanded, leaf, row, hasFocus);
                   File f = (File)value;
                   setIcon(fsv.getSystemIcon(f));
                   setText(f.getName());
                   return this;

  • Albums and Events

    Trying to figure out how to understand and organize my photos between album and events.  Right now, I'm deleting the bad photos which are too blury or I don't want for whatever reason, hide the pictures which are duplicates or that I don't want to show but still want to keep, and everything else appears in the events.  So I'm just wondering how people use events and what would you include in an album or in an event.

    Here's a canned answer I use that might spark some ideas.
    First thing:
    Events are organisation for those who can't really be bothered. They are automatic - based entirely on Date and Time the camera records the photos as taken. You can move photos between Events, you can Merge Events, you can Rename them and sort them in various ways except one: You cannot manually sort in an Event as Events are all automated.
    If you want to manually sort in an Event then you've outgrown Events as an organising tool. Now it's time to look at albums (Where you can manually sort) which are much more flexible than Events as an organising tool.
    Also
    Events contain the actual photos. Delete a Photo from an Event and you're deleting it from iPhoto. Two copies of a photo in Events mean twice the Disk Space used. Albums contain pointers to the Photos in the Library. The same photo can be in 100 Events and use no extra disk space at all. Delete from an Album and you simply remove the photo from the Album, it's still in the Library.
    I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums extensively. I title the pics broadly.
    I keyword on a
    Who
    What
    Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
    Using this system I can find pretty much find any pic in my 40k library in a couple of seconds.
    So, for example, I have a batch of pics titled 'Seattle 08' and a  typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
    File -> New Smart Album
    set it to 'All"
    title contains Seattle
    keyword is mountain
    keyword is snow
    rating is 5 stars
    Or, want a chronological album of John from birth to today?
    New Smart Album
    Keyword is John
    Set the View options to Sort By Date Ascending
    Want only the best pics?
    add Rating is greater than 4 stars
    The best thing about this system is that it's dynamic. If I add 50 more pics of John  to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
    In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me.

  • Alarm and event notification DSC

    I can't understand the functionality of these DSC VIs:
    Acknowledge Alarms .vi
    Set user Defined Alarms .vi
    Request Alarm & Event Notifications .vi
    I appreciate any guide.

    Hi Maryam,
    Acknowledge is where the sequence action that indicates recognition of a new alarm.
    Where an alarm is an abnormal process condition. In the LabVIEW Datalogging and Supervisory Control (DSC) Module, an alarm occurs if a shared variable value goes out of its defined alarm limits or if a shared variable has bad status.
    This is the URL of the DSC module Glossary:
    http://zone.ni.com/reference/en-XX/help/370246D-01/lvdschelp/dsc_glossary/
    If you want to know more about the general functionality of alarms and events and what to use specific VIs for.
    The fisrst call as I said previously should be the context help, check the example library and the NI developer zone. Another reasource which you can check is the DCS module "VI, Function, & How-To Help".
    Click on the "Help" then "VI, Function, & How-To Help", expand the following items in the tree structure "DSC Module"> "DSC Module VIs & Functions" > "Alarm & Events VIs".
    For future reference it would be helpful in future if you gave more information in your posts eg what version of LabVIEW you are using - so can post back relevent versioned example code.
    And what you are trying to do - why are you interested in the DSC alarm VIs, could make more specific replies given this information.
    Sorry if my initial replies are basic but I had no way of knowing the level of information you were looking for and you did not say what you had already tried/ looked up.
    Alarms can be used in many applications but as I said their basic functionality is to alert the user to an abnormal process condition eg sub/super limit values or bad status.
    I hope the above helps but if you require more information please let me know what it is you specifically want to know.
    Regards,
    Emma Rogulska
    NIUK & Ireland

  • HGrid, Tree and Partial Page Rendering..

    Hi!
    We use JDev 9.0.3.3 .
    Is it possible to use HGrid or Tree with partial rendering?
    Or is there a solution to use iFrame...
    any help?
    Viktor

    It is possible in my version of uix that will be shipped with 10g production. The version i got is uix 2.2.
    Did you already used tree and hgrid in an application ? If yes, did you use struts action as event to pass parameter from the tree to the hgrid ?
    We are searching a good desgn to use tree as explorer in a frame and load different content in an another one. The problem i encountered now is to define how to pass parameter from the tree to the components in the "contents" frame.
    To use frame with tree an hgrid see the code below
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <frameBorderLayout>
    <top>
    <frame source="headerFrame.uix" height="20%" />
    </top>
    <left>
    <frame source="leftFrame.uix" width="30%"/>
    </left>
    <center>
    <frame source="centerFrame.uix"/>
    </center>
    </frameBorderLayout>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    <data name="FBTreeData">
    <inline>
    <nodes text="Par date de financement" expandable="expanded">
    <nodes text="2004" expandable="expanded">
    <nodes text="Quarter 4"/>
    <nodes text="Quarter 3"/>
    <nodes text="Quarter 2"/>
    <nodes text="Quarter 1"/>
    </nodes>
    <nodes text="2003" expandable="expanded">
    <nodes text="Quarter 4"/>
    <nodes text="Quarter 3"/>
    <nodes text="Quarter 2"/>
    <nodes text="Quarter 1"/>
    </nodes>
    </nodes>
    </inline>
    </data>
    </provider>
    <contents>
    <formattedText text="this is the left frame"/>
    <tree nodes="${uix.data.FBTreeData.nodes}"/>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <formattedText text="this is the center frame"/>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>

  • Problem with trees and memory handling.

    Hi there, I just want to know if, when I create a large binary tree, and I re-"pointed" the root pointer to another node somewhere below in that same tree (say, a terminal node), will the "upper" parts of the tree (starting from the new root node) be removed/deleted from memory? Please explain your answers.
    Thank you.

    f I changed the root to B, will A and its children be
    deleted from memory?If you do root = B, AND if nothing else is referring to A or C or anything else beneath them, then A, C, and all of C's children will become eligible for garbage collection.
    Whether the memory actually gets cleaned up is something you can't really predict or control, but it doesn't really matter. If it's needed, it will get cleaned up. If it's not needed, it may or may not get cleaned up, but your program won't care.
    So, in short, yes, for all intents and purposes, A's, C's, and C's descendants' memory is released when you re-root to B.

  • Business Event Brochure in Training and Event Management?

    Hi Guru's
    My client has a requirement as follows. The training administrator decides the Business Event Types which for which superiors can book their subordinates or not. Those events are stored at a particular place. Once the administrator stores them, a mail should be triggered to all the superiors. Thus superior can have a list of event types for which he can book his subordinates. When he books for such events, a mail should be triggered to his subordinates regarding the training event. If an employee books for an event, a mail should be triggered to his superior for approval.
    How is this possible? According to me, those events will be "Included in Brochure" (in Business Event Type Infotype). Am I right?
    Please suggest me.
    Points assured!
    Thanks in advance.

    Hello ,
    see the links it might help :
    Business processes of Training and Event Managment
    Training and Event Management
    Lots of workflow

Maybe you are looking for

  • Can i use iCloud for connecting a mac mini with a macbook?

    I want to know if the connection between mac mini and a macbook is possible. Or do i have to use an i phone as well?

  • Supermatch THZ8571SKTKW colors out of wack

    Hello, My original supermatch monitor THZ8571SKTKW (build april 1995) attached to a G3-BW works fine for many years now. I just laid my hands on another supermatch monitor 21" (same model, build march 1994). This monitor image outlines are fine but c

  • Anyone fixed the recording problem on that mobo?

    Hello My motherboard sound AC97 recording is very bad the recorded sound is too low and have loud air on it, I thought it is the microphone on the start so I tried it on sound blaster but the sound was great.. What wrong with AC97 in recording, is it

  • Failure to print borderless on Epson Artisan 1430

    When trying to print borderless the menu reverts to the smaller size. ie when selecting 5x7 it reverts to 4x6. Ditto 8x10 and 11x14 etc. The paper size stays the same, just the print size reverts and the desired size disappears. I contacted Epson twi

  • Mac won't boot unless I boot in target disc mode firewired to another mac

    I've worked for Apple and I am stumped....all of the genius crew at my store are stumped...and the only thing anyone can recommend is to depot my machine! Here is the situation: The computer froze up, so I restarted- upon waiting for it to restart, a