Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8113645

NodeMenuItem does not fire OnActionEvent when clicked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Windows 7, FX 2.0 public beta (first release)

      Description

      Perhaps this is by design, but NodeMenuItem does not fire its OnActionEvent when the menu item is clicked. A workaround is to set up an appropriate event handler on the node itself rather than its enclosing menu item, but given the presence of the OnActionEvent on the MenuItem itself it seems like this should work. If you attempt to workaround this problem by setting up events on the node itself, the node event handlers become responsible for hiding the menu. Doing this programatically also has issues which I intend to file a separate issue for.

      Note that although my attached example uses a MenuButton, I also tried it on SplitMenuButton. I have not tested other types of menu-generating controls.

        Attachments

          Activity

            People

            Assignee:
            psomashe Parvathi Somashekar (Inactive)
            Reporter:
            kmcintyrejfx Kyle McIntyre (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: