Creating Context Menu for JTree Node

Hi to all,
I need to create Context Menu, when i right click on any Tree Node.
Context Menu should contain selected node information.
if you click on one tree node named as "AAAA"
Context Menu Format is as follows
AAAA
Create New
Delete
If any one knows, please help me

Here is something for you to start
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=538065
Denis Krukovsky
http://dotuseful.sourceforge.net/

Similar Messages

  • How to create Context Menu for Full Screen ALV

    Dear Experts,
    Please tell me the procedure to create Context Menu for ALV Grid (full screen ALV using SLIS ).
    Regards
    Arnab

    Hi,
    Check the demo program BCALV_GRID_06

  • Context menu for tree node cannot be accessed in IE 8 (Jdev 11.1.2)

    We use an af:tree with context menus for performing operations on each node. In IE 8 when you hover over a node before right clicking, "tooltip" text appears which basically just re-displays the text of the node. Even though the tooltip text is annoying, the context menu worked fine in 11.1.1.4, but now in 11.1.2 when you right-click on that tooltip text you get the "normal" browser context menu for text -- we no longer get our custom context menu.
    You can see this same problem on the tree in the rich faces demo: http://jdevadf.oracle.com/adf-richclient-demo/
    Sometimes, if you're quick enough, you can get the custom context menu to work, but it seems that once you've hovered long enough over one node to get the standard context menu, you're stuck and any node you click on will display the browser's normal context menu.
    This is a big problem for us because we rely on these context menus and most of our administrative users are on IE 8. Is there a workaround or can the tooltip text somehow be shut off? It doesn't appear in Firefox so Firefox works fine.
    Thanks.
    -Ed

    Hi,
    if this works on IE 7 you can force the app to run in IE7 compatibility mode
    See "Run ADF Faces applications with IE 9 in IE 8 compatibility mode" http://www.oracle.com/technetwork/developer-tools/adf/learnmore/april2011-otn-harvest-367335.pdf
    Works the same for IE8 to IE7. This then gives you a solution for until the issue is solved
    Btw.: If users click onto the folder icon (not the text, which brings up the tool tip) then the context menu work. I'll file a bug anyway
    Frank

  • Creating Context menu on TREE control

    Hi,
    How to create Context menu on Tree (Nodes and Subnodes) in Web Dynpro for ABAP.
    Helpful answers will be rewarded.
    Regards,
    Jitesh.

    Hi
    You could go to the following link http://help.sap.com/saphelp_nw2004s/helpdata/en/21/ad884118aa1709e10000000a155106/frameset.htm .
    Also you could have a closer look at wdr_test_events example
    Thanks
    Anzy

  • Creating context menu on TREE

    Hi,
    How to create Context menu on Tree (Nodes and Subnodes) in Web Dynpro for ABAP.
    Helpful answers will be rewarded.
    Regards,
    Jitesh.

    hi jitesh,
    check out the sample tutorials in sap under the package : SWDP_DEMO_TUTORIALS
    thanks
    jaideep
    reward points if useful...

  • Remove Context Menu for KM Content for Anonymous User

    Hi All,
    I have implemented External Facing Portal and i have to show KM documents
    on Anonymous user home page. For This I have created JSP page and have
    created url iview for this created JSP application. On this JSP  page to access
    KM i have used below code
    <iframe src ="/irj/go/km/navigation/documents/Public%20Documents" > </iframe>
    Now i am able to see the KM Contents of Public Documents on my Anonymous
    user Home Page .But here i need  to remove the context menu for KM Content
    for Anonymous User , but the context menu should come for Logged in user.
    How to do this ??
    Regards,
    Piyush

    solved

  • Table Context Menu for Word 2010

    I want to create a context menu for Word 2010. I'm using the code below, that works fine if I'm entering text, but menu doesn't show when entering text inside a table cell.
    I tried also the following contextMenu idMso: ContextMenuTable, ContextMenuTableCell, ContextMenuTableCellWhole, and ContextMenuTableCellWholeLinked; but still doesn't work.
    What am I doing wrong? Thanks.
    XML:
    <contextMenus>
    <contextMenu idMso="ContextMenuText">
    <menuSeparator id="CMenuSeparator1" />
    button id="BtnCMenu1" label="Block Text" imageMso="TextToolMenu" visible="true" onAction="StyleBlockText" />
    </contextMenu>
    </contextMenus>
    VBA:
    Sub StyleBlockText(control As IRibbonControl)
    Selection.Style = ActiveDocument.Styles("My Style")
    End Sub

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, you'd better post your question to the MSDN forum for Word
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Context menu for customized selfwritten VI

    Hallo!
    Maybe someone knows and has time to share: is it possible to create a customized popup/context menu for a customized - self written VI (vide .jpg)? And as working with LV 2011 I have realised it's impossible to create a polymorphic VI out of other polymorphic vi-s right?  If anybody knew any walk through, I will be thankfull
    A.

    Dear Aleph,
    information about creating run time context menus can be found here: http://www.ni.com/white-paper/3171/en/
    Another soultion, is to create your own VI that will po up when a user uses his RMB on a specific object. This can be achieved by properly using the Event Structure. Let me know if you need more information.
    What do you mean by creating a polymorphic VI from a polymorphic VI?
    Best regards,
    Mateusz Stokłosa
    Applications Engineer
    National Instruments

  • Creating Context Menus for reports

    Hi All,
    I have a classic report with some fields. Whenever I right click on any of the values in the report column, a context menu should appear with the options I define.
    Any idea abt how to do this?
    Regards,
    Sushma.

    Hi,
    <u><b>Context Menus for Lists</b></u>
    As with normal screens, the system creates a standard context menu when you use a dialog status in a list. You can call this standard context menu using the right-hand mouse button (Shift + F10). It displays all of the functions assigned to function keys.
    You can define context menus for list lines in the same way as for screen elements. To do this, you must assign a special function code to the function key Shift+F10 in the dialog status of the list. To define context menus for a list, you must first have defined a dialog status for the list and set it using SET PF-STATUS.
    In this dialog status, which you will normally create using the List status template, the List with context menu option must be selected in the function key setting attributes. To do this, place the cursor on a function key setting in the Menu Painter and choose Attributes or Goto   Attributes   F key setting. The function code %CTX is assigned to function key ShiftF10. Since the introduction of context menus on lists, it is no longer possible to assign ShiftF10 freely to any
    function in the Menu Painter. In any existing dialog status where a function code was assigned to ShiftF10, it has been reassigned to ShiftCtrl+0. You must activate the function code %CTX manually before it has any effect in the dialog status.
    As on screens, context menus on lists are generated dynamically in ABAP programs as objects of the class CL_CTMENU.
    For context menus on lists, you must program a callback routine in the ABAP program:
    FORM on_ctmenu_request USING <l_menu> TYPE REF TO cl_ctmenu.
    ENDFORM.
    In this subroutine, you can define a context menu using the object reference <l_menu> as described in the Context Menus [Page 639] section. To define a specific context menu, for example, you could get the cursor position on the list using GET CURSOR. If required, you may need to find out the current list level from the corresponding system fields (for example, SYLISTI).
    When you right-click a list line (or choose Shift+F10), the callback routine is executed, and the context menu defined in it is displayed. If the user chooses a menu item, the system carries on processing according to the function code assigned to it. The function is either executed by the runtime environment, or the corresponding event is triggered (in which case, the function code is placed in the system field SY-UCOMM).
    If you right-click outside a list line, the system displays the standard context menu.
    Ex.
    REPORT demo_list_context_menu .
    DATA: wa_spfli TYPE spfli,
    wa_sflight TYPE sflight.
    START-OF-SELECTION.
    SET PF-STATUS 'BASIC'.
    SELECT * FROM spfli INTO wa_spfli.
    WRITE: / wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-cityto.
    HIDE: wa_spfli-carrid, wa_spfli-connid.
    ENDSELECT.
    CLEAR wa_spfli.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'DETAIL'.
    CHECK NOT wa_spfli IS INITIAL.
    WRITE sy-lisel COLOR COL_HEADING.
    SELECT * FROM sflight INTO wa_sflight
    WHERE carrid = wa_spfli-carrid
    AND connid = wa_spfli-connid.
    WRITE / wa_sflight-fldate.
    ENDSELECT.
    ENDCASE.
    FORM on_ctmenu_request USING l_menu TYPE REF TO cl_ctmenu.
    DATA lin TYPE i.
    IF sy-listi = 0.
    GET CURSOR LINE lin.
    IF lin > 2.
    CALL METHOD l_menu->add_function
    EXPORTING fcode = 'DETAIL'
    text = text-001.
    ENDIF.
    CALL METHOD l_menu->add_function
    EXPORTING fcode = 'BACK'
    text = text-002.
    ENDIF.
    ENDFORM.
    In the dialog status BASIC for the basic list, %CTX is assigned to Shift+F10. In the
    callback routine, a context menu is defined. The definition depends on the cursor
    position and the list currently displayed.
    If the user right-clicks the two-line default page header on the basic list, the system displays a single-line context menu. The Back function is executed by the runtime environment. If you right-click a list line, a two-line context menu is displayed. The Detail function triggers the event AT USER-COMMAND.
    Regards,
    Bhaskar

  • In Firefox 4, how do I get back the context menu for the drop down list of the Location Bar so I can Open Link in New Tab, which I did often in FF 3?

    Firefox 3 has a context menu for the drop down list of
    the Location Bar. One option on this menu I used often
    is "Open Link in New Tab" -- quite convenient.
    This context menu has disappeared in Firefox 4.
    Can I get it back?

    See also:
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.org/kb/Form+autocomplete
    The "Use custom settings for history" setting allows to see the current history and cookie settings, but selecting that setting doesn't make any changes to history and cookie settings.<br />
    Firefox shows the "Use custom settings for history" setting as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.<br />
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".<br />

  • Context menu for .exe and .lnk slow becaus of nv3dappshext.dll

    Hi
    I recently made a fresh install of Windows 7 and I'm now noticing that the context menu for .exe and .lnk files opens very slow. With the help of ShellExView it looks like it is caused by C:\Windows\system32\nv3dappshext.dll. If i disable nv3dappshext.dll the
    problem goes away. So my first try was to reinstall all Nvidia drivers but that didn't help. I'm now thinking that there is some other file that makes nv3dappshext.dll corrupt.
    Is there anyone here that might know what's wrong?
    //Simon

    Hi Simon, did you keep this disabled? Did you report to NVID.support?
    NVIDIA are as bad as Microsoft are as bad as Intel, all kinds of application errors (going for the cleanest build on the planet :) so, given that I don't
    have
    any 3D-ready devices (ergo)
    any superfluous NVIDIA programs*
    the DISPLAY DRIVER's all I need, and still I get app issues (recently, disconcertingly, the ominous,
    snail-mode 'Kernel Processing Power' event (cores are disabled because of some event/temp?)
    BSOD/Shell Crash when extending display to AOC 2036 monitor @ 1920x1080, not gaming!
    FIXED by installing NVIDIA's 'system tool' {nTune} (THANKS!!! to Haider
    Ali Khan for the tip! TdrDelay QWORD:8 failed to fix, almost bought a new AC Adapter!) 
    New nTune issues now being monitored....
    * Custom install NVIDIA, only select the driver if you're not a gamer, sterescopic not
    {yet} required if you're in 2D, Physx Engine only for Steam(online) gamers,
    HD AUDIO not required (if you've also got HD Intel doing that for ya :D
    I will fix NVIDIA's and Microsoft's mistakes :D I might even upload my (native virtualised) build when done. It's so slick, so nice to have a tool that works, and one that can keep up with your imagination!)

  • How to deactivate the context menu for data cells in web reports

    Hello,
    we would like to have the data cells (for example: values in euro) without context menu. I mean, right now, when users navigate in web reports and stop with a mouse over the data cell, text like "Context menu for 5.000 Highlighted" appears. Especially users don't want to see the exception cells with this information like
    "Context menu for 6.000 critical 4".
    Is it possible to deactivate this context info?
    Thanks and Regards,
    Nuran Adal
    Message was edited by: Nuran Adal

    Hello Nuran,
    I guess you want to disable the Tooltip and not the ContextMenu. Anyway, use the table interface for it.
    Have a look at paramter C_CELL_CONTENT
    In Method DATA_CELL.
    This one contains strings like:
    30,0
    Rebuild this String to:
    30,0
    Kind Regards,
    Alican

  • Context menu for toolbox shows wrong menu

    when itunes is open, right-clicking on anything in the toolbar (the stuff with the little clock) results in the context menu for the whole toolbar coming up as well as the context menu for whatever i'm clicking on. unfortunately the toolbar one comes up on top so it's super annoying. however, if i wait for the tooltip to show up before right-clicking, it only shows the correct context menu. i think this is just a bug, but does anyone know a fix?

    Hi Peter,
    If you are using Enterprise Portal to publish those reports to be viewed by the user, i think ur problem may get solved in EP itself. Contact ur EP associate and find out whether it is possible to do this or not. Hope we can do it in that. Otherwise you need to write some JAVA code in WAD which helps in not getting the display as such.
    Assign points if this helps u...
    Regards,
    Koundinya Karanam.

  • Is there any way to edit the standard Firefox context menu for displayed Web pages?

    Is there any way to edit the standard Firefox context menu for displayed Web pages? I frequently want to save a picture appearing on a page. Sometimes I "slip" and hit "Send Image" when I want "Save Image As", and have to sit and wait for a default send-mail page to come up, then close it, fiddling with its "are you sure" dialogs. This is a painful way to handle a slip-up. I basically NEVER want to e-mail an element directly from a page. Is there any way I can just delete "Send Image" from the context menu?

    You can remove entries in the context menu with code in the userChrome.css file
    *http://kb.mozillazine.org/userChrome.css
    Some IDs are listed in this MozillaZine Knowledge Base article:
    *http://kb.mozillazine.org/Chrome_element_names_and_IDs
    To find the ID of others you will have to use the DOM Inspector.
    * https://support.mozilla.org/kb/DOM+Inspector
    * https://developer.mozilla.org/En/DOM_Inspector
    * https://developer.mozilla.org/en/Introduction_to_DOM_Inspector
    * DOM Inspector: https://addons.mozilla.org/firefox/addon/dom-inspector-6622/

  • How to make visible context menu for nodes of the given level of treeTable?

    Hello
    I'm using JDeveloper 11g 10.1.1.4
    I have a TreeTable component with 4 different levels (Contry-Branch-Town-Object).
    I need to show custom elements of the context menu (right click of the muse) only for rows with "Object".
    Now, I'm doing it with the aid of property "visible":
                <af:commandMenuItem text="Open" id="cmi1" immediate="true"
                                    visible="#{backingBeanScope.mbMObjectsRegistry.MObjectNode}"
                                    actionListener="#{backingBeanScope.mbMObjectsRegistry.btOpenMObject}"/>
        public boolean isMObjectNode() {
            Object oldRowKey = treeTableMObjectsRegistry.getRowKey();
            try {
                AppViewRowImpl row =
                    BindingUtils.getSelectedRowTreeTable(treeTableMObjectsRegistry);
                if (row == null || !isMOBjectRow(row)) {
                    return false;
                return isMOBjectRow(row);
            } finally {
                treeTableMObjectsRegistry.setRowKey(oldRowKey);
        private boolean isMOBjectRow(AppViewRowImpl row) {
            return (row != null) && (row instanceof MObjectsRegisterMORowImpl);
        }That works, but the problem is that it works a little bit slow, particulary if I have 5 or more menu items.
    Each menu item calls the metod isMObjectNode() 3 times per one opening of the menu.
    The question is: maybe, there is a method to calculate level of the selected node? Or, there is other variant?
    Anatolii

    You can use the following sample to develop your usecase.
    Here, we would show menu items only for the nodes at level 3.
    You can also download the entire sample based on POJO at
    http://adfsampleapplications.googlecode.com/svn/trunk/TreeSampleApplication.zip
    The code is self explanatory.
    Let know, if you have any specific questions.
    <af:form id="f1">
    <af:treeTable value="#{bindings.continents.treeModel}" var="node"
    selectionListener="#{bindings.continents.treeModel.makeCurrent}"
    rowSelection="single" id="tt1" columnStretching="last">
    <f:facet name="nodeStamp">
    <af:column id="c1">
    <af:outputText value="#{node}" id="ot2"/>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp">
    <af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    *<f:facet name="contextMenu">*
    *<af:popup id="p1" contentDelivery="lazyUncached">*
    *<af:setPropertyListener from="#{bindings.continents.treeModel.depth}"*
    *to="#{pageFlowScope.CurrentDepth}"*
    *type="popupFetch"/>*
    *<af:menu text="menu 1" id="m2">*
    *<af:commandMenuItem text="View Districts" id="cmi1"*
    *visible="#{pageFlowScope.CurrentDepth == 2 ? true : false}"/>*
    *<af:commandMenuItem text="View Attractions" id="cmi2"*
    *visible="#{pageFlowScope.CurrentDepth == 2 ? true : false}"/>*
    *</af:menu>*
    *</af:popup>*
    *</f:facet>*
    </af:treeTable>
    </af:form>
    Thanks,
    Navaneeth

Maybe you are looking for

  • Can't open image in external editor, can't export images

    Greetings helpful Aperture experts, I've just finished transferring aperture from one computer to a replacement unit. Except for being slow on my previous g5, it worked flawlessly at every level. However, now that I've xferred, I can't open Aperture

  • Display problems in IE 7?

    Hello, I updated some files in Dreamweaver yesterday and ever since I sent them live I  am having some display issues with a few of our pages in IE 7. The pages display  fine in IE 8, Chrome, Safari and Firefox. In IE7 there is a huge amount of white

  • How to link 3 tracks or more ?

    Hi there, I have a new problem. I used 2 different camcorder to film the same scene but each from different angle. I also record the voice separately. I placed the 2 videos on V1 and V2 and the sound on A1 and A2. I managed to sync the video V1 and v

  • High quality, untouched logo blurs when inserted into Photoshop PDF

    Hi all, Been having mega problems with this. I am creating a 'label' for work to be used as a promotional tool using my old Photoshop CS2 . I created a PDF and manually inserted all of the text, and insert my logo by dragging the layer onto the PDF.

  • Iweb picture templet

    About 5% of the people that try and view my web site can not view the pictures that are in picture templets. they can view the pictures that are on pages with single pictures.