First i try to add a new Attribute, which names "Controller"(booleantypen) to the nodes.
here is my code:
Code: Select all
AttributeColumn controllerCol = nodeTable.getColumn("Controller");
if(controllerCol == null){
nodeTable.addColumn("Controller",AttributeType.BOOLEAN);
for(Node n : nodes) {
n.getNodeData().getAttributes().setValue("Controller", Boolean.TRUE);
}
} else {
nodeTable.getColumn("Controller");
for(Node n : nodes) {
n.getNodeData().getAttributes().setValue("Controller", Boolean.TRUE);
}
but when i try to find those "Controller" node in another project. it will always return NullPointerException.
Code: Select all
n.getNodeData().getAttributes().getValue("Controller").equals(Boolean.TRUE)
can somebody help me .