1 Reply Latest reply on Jul 12, 2012 11:42 PM by Randall Hauch

    Documentation question on nodeTypes example code?

    Tony Herstell Master

      I was looking at this page:

      https://docs.jboss.org/author/display/MODE/Defining+custom+node+types

       

      and towards the bottom we have:

      NodeType[] nodeTypes = new NodeType[]{type};

       

      which gives:

      >> Type mismatch: cannot convert from NodeTypeTemplate to NodeType

       

      I was just trying to firkle to extend an existing node to add a few properties... this documentation is rather all-encompassing.

        • 1. Re: Documentation question on nodeTypes example code?
          Randall Hauch Master

          Hi, Tony. Thanks for pointing out that error. This line in the code example:

          NodeType[] nodeTypes = new NodeType[]{type};

          should instead be:

           

               NodeTypeDefinition[] nodeTypes = new NodeTypeDefinition[]{type};


          NodeTypeDefinition is the supertype of both NodeTypeTemplate (the editable template created by the manager to allow your code to define new types) and NodeType (the read-only representation for registered types). That matches the signature of the "registerNodeTypes(NodeTypeTemplate[],boolean)" method on the following line, too. Sorry about the error. I've corrected the documentation page, too.

           

          Please let us know if you find any other errors!