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.
The 'Make Controller' Context Menu Action creates a Controller from an FXML-File. This works partially (Initializable is deprecated) for FXML-Files with a declared Controller. In case the Root Element of the FXML-File is fx:root the generated Controller won't work. 1. The generated Controller needs to be of the type declared as an Attribute in the fx:root Element. 2. The Wizard adds a fx:controller Attribute to the fx:root Element, which it shouldn't.
"Make Controller" works for me OK, even with fx:root as FXML root element. Tested on: Product Version: NetBeans IDE Dev (Build 201310090001) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 fx:controller must be specified even when FXML root element is fx:root. Otherwise it won't be possible to run the application. If you think that something is wrong, please provide exact steps how to reproduce the problem and reopen the issue. Thanks!
Which version of IDE have you been using? If it was 7.4 RC2 or older Dev versions, then it could be caused by fxml namespace issue which has been fixed and fix is present in trunk (so in current dev builds). It's targeted for release in the next NetBeans release.
Product Version: NetBeans IDE Dev (Build 201310070001) The whole point for fx:root is that we can provide the Controller on FXMLLoader instead of defining in FXML. Try this Tutorial: http://docs.oracle.com/javafx/2/fxml_get_started/custom_control.htm#BABDAAHE You can download the NB Project here: http://docs.oracle.com/javafx/2/fxml_get_started/CustomControlExample.zip There's no controller defined in the FXML, and it's still possible to run the application.
Hm, with only type attribute, I am perhaps able to generate the Controller file, but won't be able to update the controller file afterwards. Maybe only if the controller class is the only of the type in the fxml package... weird.