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.
Summary: | Using Netbeans "Make Controller" duplicates the fx:controller property, and makes the fxml file non-loadable anymore | ||
---|---|---|---|
Product: | javafx | Reporter: | jcambon |
Component: | Visual Tool Integration | Assignee: | Svata Dedic <sdedic> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | mmirilovic, mr_lou_d, sdedic, yjoan |
Priority: | P2 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
See Also: | https://netbeans.org/bugzilla/show_bug.cgi?id=236620 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 236509 | ||
Bug Blocks: | |||
Attachments: | LoadingFailedError |
Description
jcambon
2013-09-30 15:53:12 UTC
If I'm understanding this correctly, when you create a JavaFX FXML project, an FXML file (FXMLDocument.fxml) is created along with a corresponding Controller file, and a reference to the Controller is stored in the FXML file, for example like FXMLDocumentController.javafx:controller="javafxapplication19.FXMLDocumentController" Once you make ANY change to the FXML file using Scene Builder and save it, clicking "Make Controller" causes another reference to FXMLDocumentController.javafx:controller="javafxapplication19.FXMLDocumentController" to be inserted into the FXML file, rendering it incapable of being loaded in Scene Builder. There are alternative scenarios that could cause this to happen as well. I believe this anomaly is due to the fact that the new Scene Builder updates the xmlns:fx namespace with version information (xmlns:fx="http://javafx.com/fxml/1"), which is not properly recognized by NetBeans, and hence the existence of an existing controller is NOT detected and so NetBeans will insert as many duplicates as you like of references to FXMLDocumentController.javafx:controller="javafxapplication19.FXMLDocumentController" AFAICT, If the namespace xmlns:fx="http://javafx.com/fxml/1" had been properly recognized, this bug would not arise, because NetBeans would not make the duplicate controller. PLEASE see Bug 236509 Thanks for the quick update. Yes, you understood the issue well. Any chance we get this fixed soon ? I mean in the next 7.4 update ? Created attachment 140708 [details]
LoadingFailedError
Confirmed, with patch to issue #236509 the Make controller does not duplicate the attribute; NB correctly finds the attribute and navigates to the existing controller class. Is blocked until bug 236509 fix becomes a 7.4 patch. *** Bug 236624 has been marked as a duplicate of this bug. *** The underlying change transplanted to 74 (see issue #236509). Please verify Verified Fixed in NetBeans 7.4-patch1 |