This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using fx:root, typically the controller is set on FXMLLoader, and not in the FXML-Document. Still NetBeans shows an error in the FXML-Editor if there's no controller defined and we use attributes to call controller methods. To reproduce download this NetBeans Project from Oracle's FXML Tutorial: http://docs.oracle.com/javafx/2/fxml_get_started/CustomControlExample.zip Open the FXML-File. "#doSomething" will be underlined red. The error message says: "Controller is not defined on fx:root Element", which is actually expected behavior.
Created attachment 140970 [details] Example Actually this is not only true for fx:root. Another Example where I'm using a valid fxml with "AnchorPane" as root element. Again no controller set in FXML, but via: FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("FXMLDocument.fxml")); fxmlLoader.setController(new FXMLDocumentController()); Parent root = (Parent)fxmlLoader.load();