Link 2 nodes inside JGoArea

Hi There, Just a simple inquiry . I made a class myArea inherited from JGoArea ,added this object to the view .I override the DoDrop function to drag nodes on myArea. My nodes are type of JGoIconicNode . The problem now that I can't link the 2 nodes on the area . I overide the newlink method of the view to add the link myArea instead of the document . but newlink method of the view isn't fired . I appreciate if I can get help in this. how can I link these 2 nodes !!!?? Note: I can link any of these 2 nodes to any other node outside the area . Thanks in advance

I assume you are talking about interactive linking–you can never have any problems creating a link programmatically.
By default the user cannot draw a link from a port on a node to any port (including itself) on the same node. This is implemented by the JGoPort.validLink predicate, which checks the isValidSelfNode() property for both the “from” and the “to” port.
So you can either set that property to true for both ports, or you can override JGoPort.validLink or JGoPort.getParentNode, or you can use a JGoSubGraph instead of JGoArea.

It works when I add --> “this.getPort().setValidSelfNode(true);” to the constructor of my node class .
But I didn’t get the logic . The interactive link worked between a node inside the area and a node directly on the view .why the interactive link didn’t work when both nodes were inside the area?? and what exactly is the effect of “setValidSelfNode” do in this case …