TableView Context Menu Item shows up when run on Java 8 until update 5 but not on later ones

The code below runs as its name says on Java 8 update 5 but not on later ones:
public class TableViewShowingOnlyAnAppendContextMenuItemIfRowIsEmptyElseDeleteIsIncluded extends Application {
    private final TableView<Name> table = new TableView<>();
    private final ObservableList<Name> data = FXCollections.observableArrayList(new Name("Jacob"),
            new Name("Isabella"), new Name("Ethan"), new Name("Emma"), new Name("Michael"));
    public static void main(String[] args) {
        launch(args);
    @Override
    public void start(Stage stage) {
        TableColumn<Name, String> column = new TableColumn<>("Name");
        column.setCellValueFactory(new PropertyValueFactory<>("name"));
        table.getColumns().add(column);
        table.setItems(data);
        ContextMenu contextMenu = new ContextMenu();
        contextMenu.getItems().add(new MenuItem("append"));
        table.setContextMenu(contextMenu);
        table.setRowFactory(tableView -> {
            TableRow<Name> row = new TableRow<>();
            row.contextMenuProperty().bind(
                    Bindings.when(Bindings.isNotNull(row.itemProperty()))
                            .then(showOnlyAppendContextMenuItemIfRowIsEmptyElseIncludeDelete())
                            .otherwise((ContextMenu) null));
            return row;
        Scene scene = new Scene(table);
        stage.setScene(scene);
        stage.show();
    private ContextMenu showOnlyAppendContextMenuItemIfRowIsEmptyElseIncludeDelete() {
        ContextMenu rowMenu = new ContextMenu();
        ContextMenu tableMenu = table.getContextMenu();
        if (tableMenu != null)
            rowMenu.getItems().addAll(tableMenu.getItems());
        rowMenu.getItems().add(new MenuItem("delete"));
        return rowMenu;
    public static class Name {
        private final SimpleStringProperty name;
        private Name(String name) {
            this.name = new SimpleStringProperty(name);
        public String getName() {
            return name.get();
        public void setName(String name) {
            this.name.set(name);
Can help me find the error in the code? Or if there is none, is this a regression that should be submitted? As of now, all the PCs in use have 8u5.
Thanks in advance.

Correctly answered by James_D:
http://stackoverflow.com/questions/28195552/javafx-tableview-context-menu-item-shows-up-when-run-on-java-8-until-update-5-bu
pasted below:
The fix is to create new menu items that are copies of the ones in the table's context menu:
private ContextMenu showOnlyAppendContextMenuItemIfRowIsEmptyElseIncludeDelete() {
ContextMenu rowMenu = new ContextMenu();
ContextMenu tableMenu = table.getContextMenu();
if (tableMenu != null) {
for (MenuItem item : tableMenu.getItems()) {
MenuItem rowItem = new MenuItem(item.getText());
rowItem.setGraphic(item.getGraphic());
rowItem.setOnAction(item.getOnAction());
rowMenu.getItems().add(rowItem);
rowMenu.getItems().add(new MenuItem("delete"));
return rowMenu;

Similar Messages

  • Why do keyboard shortcuts for menu items created in System Preferences appear in Firefox menus but not work?

    Given that Firefox does not obey the System Preferences custom keyboard shortcuts, why does it still display those shortcuts in the menus, thereby incorrectly telling users that they will work?
    This issue was raised 6 months ago, but the only posted answer did not explain why the menus reflect the shortcuts that Firefox doesn't obey.

    Outlines are discussed in a series of articles beginning with Creating an Outline in Chapter 5 of the Pages '09 User Guide. A similar set of articles, beginning with Creating Lists follows immediately.
    Reading through the articles, I don't see any mention of a keyboard shortcut or menu item related to moving an item up or down in the list. A search through Pages '09's menus was also unproductive.
    Apparently this 'essential function' is unsupported in Pages.
    Feature requests should be made through Provide Pages Feedback, found in the Application menu (in Pages, the 'Pages' menu), where they'll go to and be read by Apple. Here you're posting to Pages users, who can help you use existing features, but have no direct influence on missing ones.
    The Pages '09 User Guide, a searchable pdf document, is available for download via the Help menu in Pages.
    Regards,
    Barry

  • ORA-01843: not a valid month . Receive this error when running report in reporting services but not when running query in BIDS

    sql server 2008 r2
    RS2008 r2
    I can execute the query in BIDS 2008 with out a problem and I can run on our RS2005 server without a problem
    But when I deploy report and run on our RS2008 server I get the error
    An error has occurred during report processing. (rsProcessingAborted)
    Query execution failed for dataset 'NIR'. (rsErrorExecutingCommand)
    ORA-01843: not a valid month 
    QUERY:
    select * from NIR_QUARTERLY where birth_date between :PARAM1 and :PARAM2
    order by PT_CODE

    CAUSE
    The problem is caused by not using VALID dates values in the dataset.
    - This data problem was masked in the original version as the Predicate(s) used can change between versions of Oracle
    - Oracle does *not* guarantee the same explain plan or the specific order of predicates used between versions of Oracle
    Reviewing the  EXPLAIN PLAN for both versions revealed in this case:
    1) The table was partitioned
    2) The EXPLAIN PLANS were not the same due to how the partitions were accessed
    3) If the same query was used against a non-partitioned table using the same data, the following error would always occur
       ORA-01843: not a valid month
    4) The problem string value was in this case found to include the string value of  '0000-00-00'
      The ORA-01843 occurred when using the TO_DATE function against '0000-00-00'
    There is *no* Year= '0000' Month= '00' or day = '00' -- therefore the  ORA-01843: not a valid month
    --Prashanth

  • AccessControlException when run in IE or Safari, but not Applet Viewer

    My applet requires the use of a txt file as input. The txt file need only be read, and is always in the same directory as the class files and the web page the applet's running in. For a while now, there have been no problems with reading the txt file; however, recently, I've been getting a "java.security.AccessControlException: access denied (java.io.FilePermission *insert filename here* read)" error. Furthermore, this error only comes up when I run the applet in Internet Explorer or Safari; when I run it in the applet viewer, it works perfectly. On top of this, when I went to the tutorial suspecting that the problem had something to do with thread management, I noticed that all three of the applets on page http://java.sun.com/docs/books/tutorial/essential/threads/index.html of the tutorial generated errors, which may or may not indicate that the problem lies in my browsers; frankly, I'm not sure. Any help that you people can give me would be greatly appreciated!

    Applets can not read from the filesystem unless you set up policy or sign the applet (or both)
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post
    If you applet needs to read a file that is in the same location as the html file and applet why not use the
    URL object?

  • Why do some emails show up when I go to gmail directly, but not when I open Mail (which uses gmail as my only email account?

    Sometimes I don't receive a message in Mail (which uses gmail as my only email account) so I have to go to Gmail through Google to find it. This just started recently. Can this be fixed? 

    This is an IMAP account?
    DO you have rules set up on mac? If Mail is closed and not talking to gmail and you use your browser it will not have processeed all the rules, junk, spam, etc?
    Mail>Preferences>rules

  • Hide PerformancePoint "Show Details" Context Menu Item

    Hi,
    How to Hide PerformancePoint “Show Details” Context Menu Item in ScoreCard?
    I have tried the below code but i didnt get anything.
    if (PPSMA.MenuOptionHelper) {       
                PPSMA.MenuOptionHelper.prototype.showDetails = function () { return false; };
    Thanks & Regards
    Poomani Sankaran

    Hi Poomani,
    Refer this article
    http://electrovoid.wordpress.com/2012/05/03/pps-hide-show-details/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Blank context menu items

    Hi all.
    I have blank context menu items (I think thats what they are called) when I right click on something - related to Adobe
    Any ideas on what gives?
    Running windows 8.1 pro and CS6.

    Hi.
    Yes I have tried repairing. It is Acrobat X Pro - version 10.1.10

  • Create an context menu item to open a file on a specific display

    Hello,
    I have an external display connected to my MBP, but I don't always need to use it so it's not always on. I'd like to have a way to open a file (or application) on a specified display on a case by case basis. I know that I can assign an application to open on a specific display by right-clicking on the app in the dock and selecting options->assign to. The problem with this is that it's a global change. When I'm working on school work, I usually like to have reference material (pdfs, wepages, etc) open on the external display while I'm working in Word on the MBPs monitor.
    What I'd like to be able to do is right click on the file (or app) and use a context menu item to open the item on a specific display. Does anyone know of an automator action/applescript/terminal command to create a context menu item like this?
    Thanks.

    I use "Open Terminal Here" script for that:
    http://www.entropy.ch/software/applescript/

  • "Send link..." context menu item does not launch the mail client

    This was working in Firefox 12 but with the latest update to Firefox 13.x no mail client is launched (mine is Thunderbird) when context menu item "Send link..." is clicked.
    '''I have tried this with all addons disabled''' but the same problem is occurring.
    Does it happen for you? If not, how could I solve it?
    I will report as a bug if others have this problem.
    Thanks.

    I changed the network.protocol-handler.external.mailto setting in about:config to the default value (true) and that seemed to fix it.
    I don't know what changed it before though.

  • Looking for a 'view link target source' context menu item

    I'm looking for a 'view link target source' context menu item.
    I often open listings of servers' directories; they can include direct links to code files (*.py , *.pl, etc). When I click them directly, I'm asked to open them with an external editor which is not what I want to do; I want to view those files source inside of Firefox. I currently have to
    # right-click those links,
    # copy link location,
    # type "view-source:" in the Location bar,
    # paste the copied URL,
    # click Go.
    This gets time-consuming with the large amount of URLs I need to open.
    It's not a native feature for Firefox and a search at [http://addons.mozilla.org AMO] didn't come up with anything useful, for me at least.

    Hello,
    particularly, I performed the following steps:
    1. I created a SC in the local repository, which matches the SC of the track.
    2. I moved the exisiting DCs to the SC created in step 1.
    3. Now, I created new DCs in the SC in the track.
    4. I deleted all .project files from the local DCs.
    5. I copied all source files from the local DCs to the new track DCs.
    6. I checked-in these changes to the track.
    Kind regards
    Alexander

  • Reusable Context Menu Item - Web Template Termination

    When I insert a Context Menu Item that has been saved as a resuable web item the web template teminates with the following error when it is executed.
    The following error does not occur if I use a Context menu item - only if I use a resuable context menu item.  We are on SP10 for both front and back end.
    Does anyone have a similar problem?
    <b>Error Summary</b>
    Exception occured while processing the current request; this exception cannot be handled by the application or framework
    If the information on this page does not help you locate and correct the cause of the problem, contact your system administrator
    To facilitate analysis of the problem, keep a copy of this error page Hint: Most Web browsers allow you to select all content, and copy and paste it into an empty document (such as in an email or simple text file)
    Root Cause
    The initial exception that caused the request to fail, was:
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 0(:main:, row:2, col:0)

    Hi
    Just to close the loop on this problem:
    This is my final reply from SAP.
    <i>"Dear Customer,
    Patch is available on Service Market Place for download."</i>
    If you want to a more usefull explanation of what to do and save your time scratching around the Software Distribution Center I would recommend referring to OSS note 1023623 and 1011241.
    I hope this helps anyone else facing the same problem.
    Regards
    Ian

  • Kill "Open page in Internet Explorer" context menu item?

    This context menu item appears when I right-click/secondary-click links in Safari.  Can I get rid of this?
    I believe this was added by Parallels Desktop 9, which I have since uninstalled. 
    Stupid little thing, but it's bugging me. Especially when I click that choice by mistake (Yes, I am an OS X/Mac n00b.)
    rMBP, 15-inch, early 2013, OS X 10.9

    http://www.parallels.com/open-in-ie/ it's a safari extention. In the link is shown how to remove it.

  • Is it possible to create a checkmark next to a context menu item in a Tree in LabVIEW?

    Hello,
    I'm creating a custom application where a particular context menu will be shown to the user depending on what item in the Tree they have right-clicked on. One of the items in the menu that I would like to display is essentially a "Disable" option. I'm looking for a way to show the user the current state of this Disable option by providing a checkmark next to it if they have already clicked it for a particular item in the tree. Here's a screenshot of a similar checkmark from the LabVIEW dev environment drop-down menus:
    Does anyone know if it is possible to create a context menu with a checkmark like the one above in a Tree in LabVIEW? I've tried searching the web and here in the NI forums but without much luck. Thanks!
    Lars L

    Wow, I know this one!
    I used it a couple of years ago (LV 8.6)
    There is an option to "Set Menu Item Info" that allows you to set the check for a context menu item.
    http://zone.ni.com/reference/en-XX/help/371361H-01/glang/set_menu_item_info/
    I used it in my Tree
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Context Menu Item Click crashes IE

    Hi
    can anybody tell me why my flex 2 final release application
    crashes when a context menu item is selected ???
    i can give code if required???
    thanks
    mehul

    FANTASTIC!  I love right clicking stuff.  Thank you very much!
    More please!

  • How to change the default position of context menu item? (C#)

    Hi,
    I have included a calendar context menu item with my Outlook Addin. But by default, its positioned at the last as shown in the picture below:
    I need a way to make it as the fourth item instead of last one. Also, I want set an icon for the same. How can I do that?
    Appreciate if you can give some sample examples.
    Thanks in advance.
    Thanks Prasad

    Hello Prasad,
    The
    Customizing Context Menus in Office 2010 article in MSDN describes the basics.
    You can specify the IdMso value of the built-in control after/before you need to insert your own:
    <button id="MyBtn" label="MyButton" insertBeforeMso="OpenSelectedItems" />
    See
    Office 2013 Help Files: Office Fluent User Interface Control Identifiers 
    for IdMso values.

Maybe you are looking for

  • Help! SQL server database log file increasing enormously

    I have 5 SSIS jobs running in sql server job agent and some of them are pulling transactional data into our database over the interval of 4 hours frequently. The problem is log file of our database is growing rapidly which means in a day, it eats up

  • Volume too low on album purchased on iTunes

    I purchased an album on iTunes and when I burn to CD the volume is too low. I have done all suggest things to "enhance" the sound. All other items I have purchased are fine. It just seems to be this one album. Any suggestions. Is there a way to "repu

  • RFC-XI-SOAP scenario

    Hi friends, I m doing a RFC-XI-SOAP scenario. I m getting an error when tried to run this. soap fault: Server was unable to read request. ---> There is an error in XML document (1, 297). ---> Input string was not in a correct format. Is this because

  • How can I turn off Location-aware browsing?

    Got notice of upgrade. Downloaded 3.6.15 and installed. On your page describing new features, you prominently mention "Location-aware browsing," as well as the fact that I can turn this spyware off, but after looking through all the "Tools" area, I c

  • Insert from scanner - all menu items grayed out (Acrobat XI)

    I can create documents from the scanner (e.g. Edit > Create > PDF from Scanner), but I cannot insert pages directly from the scanner (e.g. Tools > More Insert Options > Insert from Scanner). Any suggestions why that might be the case? I am running Ve