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.

Bug 262304 - FXML Editor giving error when parsing an element that use @NamedArg in constructor.
Summary: FXML Editor giving error when parsing an element that use @NamedArg in constr...
Status: NEW
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2016-06-02 09:19 UTC by ugurkara
Modified: 2016-06-02 09:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description ugurkara 2016-06-02 09:19:53 UTC
When i use my own  element that use @NamedArg, XML editor showing error that "... can not be created by FXML Loader".

public class MySymbol extends StackPane {

    public final ObservableList<Node> getChildren() {
        return super.getChildren();

    public MySymbol(@NamedArg("url") String url) {
        try {
            FXMLLoader loader = new FXMLLoader(new URL(url));
        } catch (IOException ex) {
            Logger.getLogger(MySymbol.class.getName()).log(Level.SEVERE, null, ex);


Here is sub FXML component,

<fx:root type="StackPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="117.0" prefWidth="94.0" xmlns="" xmlns:fx="">
        <Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="89.0" stroke="BLACK" strokeType="INSIDE" width="63.0" />
        <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Tank 1" />

And Main document that use sub nodes

<AnchorPane id="AnchorPane" prefHeight="337.0" prefWidth="453.0" xmlns="" xmlns:fx="" fx:controller="test01.FXMLDocumentController">
        <MySymbol url="@MySymbol2.fxml"></MySymbol>

when i run this application isOK, but in xml editor showing error.