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.
Created attachment 145497 [details] Screenshot showing warning and truncated label "FXML Na..." NB 8.0 RC1 The New File wizard for an Empty FXML file does not allow a space in the FXML filename. I could find no references in FXML documentation that indicated this was illegal. (Note also from the attached screenshot that the label for the filename field is truncated on OS X.)
JavaFX Scene Builder certainly allows spaces in the middle of an FXML filename, and NetBeans accepts an FXML file with spaces in it's filename; you can build and run with same. I suspect it's only over-zealous validation in the Wizard that is at issue. I confirmed this with: JavaFX Scene Builder, Version: 2.0-b14 Product Version: NetBeans IDE 8.0 RC1 (Build 201402202300) Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b69 Runtime: Java(TM) SE Runtime Environment 1.8.0-b129 System: Windows 8 version 6.2 running on x86; Cp1252; en_US (nb)
The same for Windows XP.
In some test cases it's pointed "FXML filename" and in others "FXMLfilename", that's why I probably missed this issue before. Thanks to Scott again!
The wizard checks whether given name is valid Java identifier (which doesn't allow spaces). If we remove this constraint, then it'll break the current implementation of "Make controller" action, which by default creates a controller with name in form: {FXML_NAME}Controller. I am not sure whether this is even P3 issue, seems to me more as P4...
I suspected it was related to the naming of the controller. I agree that this could possibly be a P4. The restriction should still be removed as it is in the wrong place. The method that makes the default name for the controller should simply filter out illegal characters from the filename and camelCase the result to come up with the initial name. (or something similar)
fixed in jet-main: http://hg.netbeans.org/jet-main/rev/aafa2cad5060
Integrated into 'main-silver', will be available in build *201406190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/aafa2cad5060 User: Roman Svitanic <rsvitanic@netbeans.org> Log: #242234: Can't create a new FXML file with a space in the name - fixed
Verified FIXED using: Product Version: NetBeans IDE Dev (Build 201407200001) Java: 1.8.0_20-ea; Java HotSpot(TM) Client VM 25.20-b20 Runtime: Java(TM) SE Runtime Environment 1.8.0_20-ea-b21 System: Windows 8 version 6.2 running on x86; Cp1252; en_US (nb) Note: Must use JavaFX Scene Builder 2.0 or greater to handle spaces in filenames...