Node duplication

Any API for duplicating a node with all the same attributes?
clone() ?

john16384 wrote:
JavaFX classes donot implement Cloneable, so clone() is out.
They donot implement Serializable either so tricks relying on that are not going to work either.
You could look into a framework that can do this copying, like Dozer, but I suspect it might be easier to do it yourself depending on your use case.Thanks. Since the size of the distribution is sensitive, any third party library should be avoided. I am afraid, the best solution then would be duplicate it by my self.

Similar Messages

  • Please help with JTree Node Duplication

    Iam building a JTree which should not allow node duplication.
    1.)First i construct a ArrayList which stores all the previous nodes.
    treeNodeNames=new ArrayList();
    2.)i call the method
              readTreeNodeNames((DefaultMutableTreeNode)dtm.getRoot());
    3.)The method readTreeNodeNames is
    public void readTreeNodeNames(DefaultMutableTreeNode node) {
              if(node.toString().toLowerCase().length()!=0) {
              treeNodeNames.add(node.toString().toLowerCase());
              for(Enumeration en=node.children();en.hasMoreElements();) {
                   DefaultMutableTreeNode childNode=(DefaultMutableTreeNode)en.nextElement();      
                   if(childNode.toString().toLowerCase().length()!=0) {
                        treeNodeNames.add(childNode.toString().toLowerCase());
                   if(!childNode.isLeaf()) {
                        readTreeNodeNames(childNode);
    4.)i have four menu when right click a node add,modify,add subnode,delete.
    node duplication fails in my case.when should i call this method?should i call while doing every above mentioned operations or in TreeModelEvent implementations?
    i have mailed this problem already two times.but no one has not replied.Kinldy consider it and give me a solution.Or anyone having code for JTree Node duplication please send me to [email protected]

    Hi all,
    Any ideas to overcome this problem.?
    Thanks,
    Krish

  • JTree node duplication

    I have a JTree which checks for duplication everytime a child node gets added.I have a combobox in cell Editor from which user can select the child node or he can give his own name also.If the node is already added,it will give a warning dialog.I have set root node as 'Device'.If i add 'Device' again in the tree somewhere,the warning dialog pops up two times.I want the warning dialog to come only one time.For other names it comes only once.I use arraylist to store the names of the nodes already added in tree and compare the new node(to be added)with them.i have given the code here..
    public void readTreeNodeNames(DefaultMutableTreeNode node) {
         treeNodeNames.add(node.toString().toLowerCase());
         for(Enumeration en=node.children();en.hasMoreElements();) {
         DefaultMutableTreeNode childNode=(DefaultMutableTreeNode)en.nextElement();      
         treeNodeNames.add(childNode.toString().toLowerCase());
         if(!childNode.isLeaf()) {
         readTreeNodeNames(childNode);
    public void treeNodesChanged(TreeModelEvent tme){
         selectedNode = (DefaultMutableTreeNode)hierarchyTree.getLastSelectedPathComponent();
         if(treeNodeNames.contains(selectedNode.toString().toLowerCase())) {                   
         Toolkit.getDefaultToolkit().beep();
         JOptionPane.showMessageDialog(this,BuilderUtils.getString("DDFE.DeviceHierarchyScreen.warningMessage5.text"),"Warning!",JOptionPane.WARNING_MESSAGE);     
         setEditable();     
    public void setEditable(){
         treeNodeNames=new ArrayList();
         readTreeNodeNames((DefaultMutableTreeNode)dtm.getRoot());     
         TreePath treePath=(TreePath)hierarchyTree.getSelectionPath();
         hierarchyTree.expandPath(hierarchyTree.getSelectionPath());
         hierarchyTree.setEditable(true);
         hierarchyTree.startEditingAtPath(treePath);
         updateUI();
    public void createNode(){
         // code for creating a Node at same level
         selectedNode=(DefaultMutableTreeNode)hierarchyTree.getLastSelectedPathComponent();
         parentNode=(DefaultMutableTreeNode)selectedNode.getParent();           
         DefaultMutableTreeNode node=new DefaultMutableTreeNode("");
         rootNode=(DefaultMutableTreeNode)node.getRoot();     
         dtm.insertNodeInto(node, parentNode, parentNode.getChildCount());           
         TreePath tp = new TreePath(node.getPath());
         hierarchyTree.scrollPathToVisible(tp);
         hierarchyTree.setSelectionPath(tp);      
         setEditable();

    What you can do is to create a second TreeNode with same userOject as in first.
    Denis Krukovsky
    http://dotuseful.sourceforge.net/

  • Problem with trees(Duplication of the parent node in creation of  children)

    Hi guys i am experiencing a slight problem with the creation of trees.Here is a clear explanation of my program.I created a program that generates edges from a set of datapoints then use each and every edge that is generated to create multiple trees with the edge as the rootnode for each and every tree.Everything up to so far everything went well but the problem comes when i want the program to pick every single tree and traverse through the set of generated edges to create the children of a tree.What it does at the moment for each tree is returning the a duplication of the parent node as the child nodes and that is a problem.Can anyone related with this problem help.Your help will be appreciated.
    The code
    TreeNode class
    package SPO;
    import java.util.*;
    public class TreeNode
            Edge edge;
            TreeNode node;
         Vector childrens = new Vector();
            public TreeNode(Edge edge)
                    this.edge = edge;
            public synchronized  void insert(Edge edge)
                    if(edge.fromNode == this.edge.toNode)
                            if(node == null )
                                    node = new TreeNode(edge);
                                    childrens.add(node);
                            else
                        node.insert(edge);
                                    childrens.add(node);
    Tree class
    package SPO;
    import java.util.*;
    public class Tree
            TreeNode rootNode;
         public Tree()
                    rootNode = null;
            public Tree[]  createTrees(Vector initTrees,Vector edges)
                   Tree [] trees =  new Tree[initTrees.size()];
                   for(int c = 0;c < trees.length;c++)
                      trees[c] = (Tree)initTrees.elementAt(c);     
                   for(int i = 0;i < trees.length;i++)
                            for(int x = 0;x < edges.size();x++)
                                    Vector temp = (Vector)edges.elementAt(x);
                                    for(int y = 0;y < temp.size();y++)
                                           trees.insertNode((Edge)temp.elementAt(y));
    return trees;
    public void printTree(Tree tree)
    System.out.print("("+tree.rootNode.edge.fromNode.getObjName()+","+tree.rootNode.edge.toNode.getObjName()+")");
    Vector siblings = tree.rootNode.childrens;
    for(int i = 0; i < siblings.size();i++)
    TreeNode node = (TreeNode)siblings.elementAt(i);
    System.out.print("("+node.edge.fromNode.getObjName()+","+node.edge.toNode.getObjName()+")");
    System.out.println();
    public Vector initializeTrees(Vector edges)
    Vector trees = new Vector();
    for(int i = 0;i < edges.size();i++)
    Vector temp = (Vector)edges.elementAt(i);
    for(int j = 0;j < temp.size();j++)
    Tree tree = new Tree();
    tree.insertNode((Edge)temp.elementAt(j));
    trees.add(tree);
    return trees;
    public synchronized void insertNode(Edge edge)
    if(rootNode == null)
    rootNode = new TreeNode(edge);
    else
    rootNode.insert(edge);
    EdgeGenerator class
    package SPO;
    import java.util.*;
    import k_means.*;
    public class EdgeGenerator
         public EdgeGenerator()
    public Vector createEdges(Vector dataPoints)
    //OrderPair orderPair = new OrderPair();
    Vector edges = new Vector();
    for(int i = 0;i < dataPoints.size()-1 ;i++)
    Vector temp = new Vector();
    for(int j = i+1;j < dataPoints.size();j++)
    //Create an order of edges
    Edge edge = new Edge((DataPoint)dataPoints.elementAt(i),(DataPoint)dataPoints.elementAt(j));
    temp.add(edge);
    edges.add(temp);
    return edges;
    Edge class
    package SPO;
    import k_means.*;
    public class Edge
    public DataPoint toNode;
    public DataPoint fromNode;
    public Edge(DataPoint x,DataPoint y)
    if (x.getX() > y.getX())
    this.fromNode = x;
    this.toNode = y;
    else
    this.fromNode=y;
    this.toNode = x;
    Entry Point
    package SPO;
    import java.util.*;
    import k_means.*;
    public class Tester {
         public static void main(String[] args)
              Vector dataPoints = new Vector();
              dataPoints.add(new DataPoint(140, "Orange"));
              dataPoints.add(new DataPoint(114.2, "Lemmon"));
              dataPoints.add(new DataPoint(111.5, "Coke"));
              dataPoints.add(new DataPoint(104.6, "Pine apple"));
              dataPoints.add(new DataPoint(94.1, "W grape"));
              dataPoints.add(new DataPoint(85.2, "Appletizer"));
              dataPoints.add(new DataPoint(84.8, "R Grape"));
              dataPoints.add(new DataPoint(74.2, "Sprite"));
              dataPoints.add(new DataPoint(69.2, "Granadilla"));
              dataPoints.add(new DataPoint(59, "Strawbery"));
              dataPoints.add(new DataPoint(45.5, "Stone"));
              dataPoints.add(new DataPoint(36.3, "Yam"));
              dataPoints.add(new DataPoint(27, "Cocoa"));
              dataPoints.add(new DataPoint(13.8, "Pawpaw"));
    EdgeGenerator eg = new EdgeGenerator();
    Vector edges = eg.createEdges(dataPoints);
    Tree treeMaker = new Tree();
    Vector partialTrees = treeMaker.initializeTrees(edges);
    Tree [] trees = treeMaker.createTrees(partialTrees,edges);
    for(int i = 0;i < trees.length;i++)
    treeMaker.printTree(trees[i]);
    The program output
    Each and every "@" symbol represents the start of a tree
    @(Orange,Lemmon)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)
    @(Orange,Coke)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)
    @(Orange,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Orange,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Orange,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Orange,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Orange,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Orange,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Orange,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Orange,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Orange,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Orange,Cocoa)(Cocoa,Pawpaw)
    @(Orange,Pawpaw)
    @(Lemmon,Coke)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)
    @(Lemmon,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Lemmon,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Lemmon,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Lemmon,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Lemmon,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Lemmon,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Lemmon,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Lemmon,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Lemmon,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Lemmon,Cocoa)(Cocoa,Pawpaw)
    @(Lemmon,Pawpaw)
    @(Coke,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Coke,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Coke,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Coke,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Coke,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Coke,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Coke,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Coke,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Coke,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Coke,Cocoa)(Cocoa,Pawpaw)
    @(Coke,Pawpaw)
    @(Pine apple,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Pine apple,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Pine apple,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Pine apple,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Pine apple,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Pine apple,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Pine apple,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Pine apple,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Pine apple,Cocoa)(Cocoa,Pawpaw)
    @(Pine apple,Pawpaw)
    @(W grape,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(W grape,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(W grape,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(W grape,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(W grape,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(W grape,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(W grape,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(W grape,Cocoa)(Cocoa,Pawpaw)
    @(W grape,Pawpaw)
    @(Appletizer,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Appletizer,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Appletizer,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Appletizer,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Appletizer,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Appletizer,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Appletizer,Cocoa)(Cocoa,Pawpaw)
    @(Appletizer,Pawpaw)
    @(R Grape,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(R Grape,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(R Grape,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(R Grape,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(R Grape,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(R Grape,Cocoa)(Cocoa,Pawpaw)
    @(R Grape,Pawpaw)
    @(Sprite,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Sprite,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Sprite,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Sprite,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Sprite,Cocoa)(Cocoa,Pawpaw)
    @(Sprite,Pawpaw)
    @(Granadilla,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Granadilla,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Granadilla,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Granadilla,Cocoa)(Cocoa,Pawpaw)
    @(Granadilla,Pawpaw)
    @(Strawbery,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Strawbery,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Strawbery,Cocoa)(Cocoa,Pawpaw)
    @(Strawbery,Pawpaw)
    @(Stone,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Stone,Cocoa)(Cocoa,Pawpaw)
    @(Stone,Pawpaw)
    @(Yam,Cocoa)(Cocoa,Pawpaw)
    @(Yam,Pawpaw)
    @(Cocoa,Pawpaw)

    Your program description makes no sense. What exactly is it supposed to do?
    Your errors make no sense. What is it doing wrong?
    Your program output makes no sense. Look up pre-order, in-order, and post-order notation for representing trees. Pick one of those that you think would be best. I would go with pre-order. Because what you are doing isn't understandable.
    By the way, I think your concept of a tree is flawed. A node in a tree has 3 things. it has a reference to its parent, it has references to any of its children, and it has some key value that represents the node (if each node were represented by numbers, the value would be an integer or something). In the case of the root, its reference to its parent is null. I don't know what you are doing with your tree, but it is highly confusing.

  • Duplication of nodes in JTrees

    Hi,
    I have GUI a system in which one of the screens contains a JTree which in turn contains two JTrees. Whilst the two internal JTrees have different names they each contain nodes which have the same names as nodes in the other tree.
    My problem is that when the trees are fully expanded and I select one node and call setIcon(Icon) on it both it and the one with the same name in the other tree are updated with the new icon. The server side cannot provide me with any different values to display in the trees and setIcon(Icon) does not seem to be able to distinguish between the two (ie selected and unselected) when it is called.
    Any ideas would be gratefully appreciated.
    Thanks
    TW

    Here is the code, sorry the tabs etc did not come out properly:
         public Component getTreeCellRendererComponent(JTree tree,
              Object value, boolean selected, boolean expanded,
              boolean leaf, int row, boolean hasFocus)
              super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row,hasFocus);
              String nodeStr = value.toString().trim();
              if(nodeStr.equals(sysAStr))
                   isSYS0 = true;
                   isSYS1 = false;
              else if(nodeStr.equals(sysBStr))
                   isSYS0 = false;
                   isSYS1 = true;
              // if node is leaf or SYS-SYS interface test
              if (leaf || value.equals(currentLocale.getString("SYSABInterfaceTest")) ||
              value.equals(currentLocale.getString("SYSBAInterfaceTest")))
                   // set icon on tests to run
                   if (CTGPanel.selectedTestsArrayList.exists(nodeStr, isSYS0))
                        // components on different SYSs may have the same path, ensure that the correct path is set
                        MONTreeComponent component = CTGPanel.selectedTestsArrayList.getComponent(nodeStr, isSYS0);
                        if(component instanceof TreeComponent)
                             if(((TreeComponent)component).isSYS0() && isSYS0)
                                  setIcon(readyIcon);
                             else if(!((TreeComponent)component).isSYS0() && isSYS1)
                                       setIcon(readyIcon);
                             else // is Interface Test
                             setIcon(readyIcon);
                   else if (CTGPanel.runningTestsArrayList.exists(nodeStr, isSYS0))
                        // components on different SYSs may have the same path, ensure that the correct path is set
                        MONTreeComponent component = CTGPanel.runningTestsArrayList.getComponent(nodeStr, isSYS0);
                        if(component instanceof TreeComponent)
                             if(((TreeComponent)component).isSYS0() && isSYS0)
                                  setIcon(runningIcon);
                             else if(!((TreeComponent)component).isSYS0() && isSYS1)
                                  setIcon(runningIcon);
                        else     // interface test
                        setIcon(runningIcon);

  • ABAP OO:  Duplication of selected data in created objects?

    I am new to ABAP OO and I have a conceptual question/concern that I cannot resolve.  Can someone explain what I am missing?
    I would think that selecting and storing (in internal tables) a large amount of data from many related database tables and, at the same time, creating and storing objects from this same data would unnecessarily consume a huge amount of memory.  To avoid this problem, it seems that the selected data and created objects should not be stored in internal tables simultaneously.
    Does this concern make sense?  If so, how is this problem best handled?
    Does it make sense to delete the corresponding data once the objects are created (to free memory)?
    Or does it make sense to keep the data and only temporarily create objects as needed?
    Thanks.

    Hello Matt
    The approach you describe is to select data first and the feed the object instances with them. <b>Why not let the object instances do the data selection themselves?</b>
    I will give you an example what I mean.
    (1) Lets assume I want to write an application that allows to deal with cost center hierarchies. On the selection screen you can choose one or many cost center hierarchies.
    (2) Using the selection criteria I would select all cost center hierarchies but without any details (just the key values).
    (3) Next I would loop over the cost center hierarchies and create a cost center hierarchy instance (a class you have to define yourself) for each key value. The CONSTRUCTOR of this class will have an IMPORTING parameter like <i>id_kostl_hier</i>.
    (4) In the CONSTRUCTOR method I first check if the cost center hierarchy exists (if not raise an exception-class based exception) and then do the selection of the hierarchy details (e.g. the cost centers).
    (5) The instances are collected in an itab of the "frame" application.
    Using this approach you will have little duplication of data within your application. Furthermore, if you really have to deal with huge amounts of data then you could read them only on demand (like in tree controls where the sub-nodes usually are read when the parent node is expanded).
    Hope I could give you some fresh insights into this exciting topic.
    Regards
      Uwe

  • Same child value under different parent node and these also some childs

    Hi guys,
    Can anyone suggest me on the hierarchy creation with duplication of node data as
    follow  we have
    one text node under 3 childs and these have same data value &
    these have some child values 
    here we have problem with same data node as not accept the following childs..
    pls help me on this.....

    Hi.
    have a look on this link
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/fb/b74d3c006f0a1de10000000a11402f/frameset.htm
    hope it helps.

  • Hierarchy from flat file loading with errors - duplicate node names

    Hello experts,
    I am loading a product hierarchy from a flat file into a custom hierarchy
    object.  The issue is that it errors out saying I am loading
    duplicates within nodes, however all node IDs within a level are unique.
    It seems to be looking at the node name to determine uniqueness and I know
    we have some duplication within the text there especially when you factor
    in the 32 character limitation for the node name.  Does anyone have an idea
    as to whether it is possible to have it only consider the node ID instead
    of the node name to determine uniqueness?
    A colleague suggested using the link ID to fix this problem but I don't know how that field works or how to populate it.
    I'm working in a BI 7.0 environment (I don't know if that makes a difference since you still have to use the 3.x objects to extract the hierarchy).
    Any help would be appreciated.
    Nancy

    Hi Nancy,
    You may wish to check this OSS Note 1026749 - Hierarchies: Consistency check for duplicate nodes and 912115 (old one)
    Symptom -
    When you load or activate a hierarchy it terminates with error message RH 109 or RH 211. The hierarchy contains duplicate nodes and this is not allowed. The long texts of messages RH 109 or RH 211 do not describe the reason for the problem sufficiently or they are partially incorrect.
    There is uncertainty about in which cases duplicate nodes exist in a hierarchy and in which cases duplicate nodes are allowed.
    Hope this helps,
    Bye...
    Naga Timmaraju

  • Y scale flip in waveform graph when using property node.

    I'm having problem with property node. I'm trying to build a stackable scope with Waveform Graph And dynamically change the number of plots. It is working. But The Y scale is flipping. The minimum goes on the upper part and the minimum scale goes down. when I change it appearance it's not very fast. It take about 1 or 2 second on my computer.
    The way it is build actually is:
    Cluster_1 is containing 8 clusters. And each of the 8 clusters are containing a Waveform Graph. By reference I change the property of each Waveform to make visible or not each of the Waveforms.
    First I would like to solve the scale problem and second accelerate the redrawing of my scope.
    Maybe there is an other way t
    o do what I need.
    Thanks.
    Nitrof
    Attachments:
    MultiScopeExample.llb ‏192 KB

    Wow, you have a neat program! The problem with your y axis flipping is because the last four charts in the cluster were programmed with a flipped axis. I relabeled the charts and it worked correctly.
    From what I could tell with your code, you do not need the sequence structures. The one inside of the even actually runs the same code twice. Remove this duplication and you should see improvement. Also clusters are slow, so you should not expect it to blink back with additional coding. Use defer panel updates to get that behavior. I incorporated these changes and attached the program.
    Jeremy Braden
    National Instruments
    Attachments:
    MultiScopeExample.vi ‏163 KB

  • Duplication checking

    Hello gurus!
    Is there anybody who used ADDRESS_SEARCH and ADDRESS_UPDATE badies for duplication checking?
    Could you provide me with roadmap (code samples, descriptions) how to use them? My case: Business Partner duplication check by name and telephone number.
    I have read next document, but unfortunately this field is still unclear for me.
    http://help.sap.com/saphelp_crm50/helpdata/en/a3/eaa43ab9db4814e10000000a11402f/frameset.htm
    Thank you in advance!
    Kirill

    Hello Krill,
    1)You are creating a BP,category Organization  and saved it.
    2)You have activated those BADI'S that you've mentioned(Address_search,Address_Update) what happens is the sytem will carry out a duplicate check based on certain threshold values that you have mentioned in the customizing.(a dialogue box pops up indicating all possible duplicates)
    3)You can tell the system that the BP you are trying to create is not a duplicate,
    its duplicate, or you can create a cleansing Case.
    4)Using BUPA_CLEAR, you can manually search for duplicates, enter the weighing factor, select the process (Note you can manually do the cleansing process of Automatically.
    5)Execute the BT and drag and drop the BP you want to cleance.
    6)In the transction enter BUPA_CLEAR enter the cleansing case number.
    7)Compare the BP for a node comparision.
    8)Maintain the number range for Data Cleansing. in CA>SAP BP>Data Cleansing
    9)enter the Numebr range object.
    10)Define Priorities.
    11)Activate Duplicate cleansing.
    12)Remember we need to make settings in the BAS(Business Address Service)
    which is integrated with the SAP Regional Structure, which has to be populated with data either manually(administration overhead is a constraint, or using a Program), Activate Duplicate check index pools.(SAP Web application server)
    13)use Transaction SM30
    14) display table /SMBCRM/TSAD10
    15) this is where you find all the tables.
    Finally If your BADIS(Address_Search and ADDRESS_UPDATE) will work accordingly and they only provide an interface for  a third party application to come in to contact and do the actuall work. they are defenitely helpless without an external application. Check with SAP for the list of 3rd Party tool available.
    Reward with points.
    cheers,
    Muralidhar Prasad.C

  • ORA-24544 When Creating a Standby From RAC One Node

    I have a RAC One Node database running on node A and am attempting to create a Data Guard standby on node B using the following RMAN command -
    duplicate target database for standby from active database
    Error returned is -
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 03/10/2015 11:11:06
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-04014: startup failed: ORA-24544: Oracle RAC One Node instance is already running.
    Can anyone advise ?
    Thanks in advance

    Hi,
    ORA-24544: Oracle RAC One Node instance is already running.
    Cause: An instance startup failed because an instance of the Oracle RAC One Node database was already running on one of the cluster nodes.
    Action: In Oracle RAC One Node, avoid any attempt to start a second instance by any means while the instance is already running.
    I have never used One Node RAC, but it looks like RMAN trying to start an offline instance of current One Node RAC on Node B.
    HTH,
    Pradeep

  • Duplication of messages in Integration Engine Monitoring

    I send a file from sender(File System) to receiver (BPM). 1 sender 1 receiver.
    There are 2 entries of sender to receiver in Integration Engine Monitoring. These rows are identical.
    Quality of Service for File adapter is exactly once.
    Could anyone expain this duplication?
    Adapter Engine  monitoring shows one message of sender

    Hi,
    pls see the below note for help.
    note number: 821267 File FAQ.
    . FTP Sender File Processing in Cluster Environment
    Q: When running the File Adapter in an environment with more than a single J2EE server instance, the same file is fetched by multiple cluster nodes at once. How do I solve this problem?
    A: Initially, please make sure that you do NOT use the processing mode "Test" for your File Sender channel. This mode is intended to be used only for testing purposes and is not guaranteed to work in a cluster environment.
    Additionally, please activate the "Advanced Mode" for the respective sender channel or upgrade to SP11 Patch Level 2 or SP12. No further configuration changes are necessary.
    Regards,
    Satish

  • Creating DR standby from RAC to single NODE

    OS and Database versions Primary:
    node1:- OEL 5.7
    node2:- OEL 5.7
    inst1:- prod1 Oracle 11.2.0.3
    inst2:- prod2 Oracle 11.2.0.3
    Standby:
    OEL 5.7
    Oracle 11.2.0.3
    NOTE:- Creating Standby on Single node.
    My scenario:
    ============
    node1:- linuxdb1
    node2:- linuxdb2
    inst1:- prod1
    inst2:- prod2
    Point1:- We have 2 node RAC with ASM disk and database is okay. Now i want to make DR on single node with ASM disk created already.
    Point2:- grid and oracle users are on RAC prod database & also same grid and oracle users on SINGLE node DR
    Point3:- Took RMAN backup from prod database ( 2 node RAC ) and copied to DR as shown below:
    RMAN>backup device type disk format '/u02/stby/%U' database plus archivelog;
    RMAN>backup device type disk format '/u02/stby/%U' current controlfile for standby;
    scp -rp /u02/stby/* [email protected]:/u02/stby/
    Point4:- Now when i run below command on DR ( oracle@linuxdr2 )
    [oracle@linuxdr2 stby]$ rman target sys/pwd@prod1 auxiliary /
    Recovery Manager: Release 11.2.0.3.0 - Production on Sun Mar 10 13:18:20 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    connected to target database: PROD (DBID=220323208)
    connected to auxiliary database: PROD (not mounted)
    RMAN> duplicate target database for standby;
    Starting Duplicate Db at 10-MAR-13
    using target database control file instead of recovery catalog
    configuration for DISK channel 2 is ignored
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=1142 device type=DISK
    contents of Memory Script:
    restore clone standby controlfile;
    executing Memory Script
    Starting restore at 10-MAR-13
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: reading from backup piece /u02/stby/33o464m6_1_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 03/10/2013 13:19:22
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred
    Can you please help me to resolve the issue.
    Thanks,
    Vikhar

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 03/10/2013 13:19:22
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred Any errors in alert log file?
    Have you tried once again ?
    Why cant you go for RMAN duplicate from active database, If you have any concerns then enable trace of RMAN and share the information
    rman target / log=/u01/test/rman_log.txt trace=/u01/test/rmantrace.log

  • Changing Node name and appending sibling in DOM

    Dear all,
    I have what seems like a trivial problem. In a DOM I want to grab nodes with a certain name, duplicate them and attach the duplicated node with a different name to the original node. The duplication bit is no problem with cloneNode(). But there don't seem to be any method for the other tasks (something like: setNodeName() and appendSibling()). Any ideas?
    Cheers!
    NetWundi

    as for the rename, you will need to just create a new
    node, and position it in place of the old one, moving
    the old one's children to the new node. As for
    appendsibling, there is no such thing, you need to
    get the parent, and use insertBefore(Node newChild,
    Node refChild)Thank you for the reply! I will try it like this then.
    All the best!

  • BP duplication prevention

    Hi,
    I need to find, in B2C scenario, a solution where new users cannot create accounts
    using duplicate address data.
    ( When new user tries to create a user with duplicate data the webshop page should show a message, telling certain duplication problems.)
    I read that there is an add-on for Service Industries, which is free.
    However I do not know how to find and install it.
    I also read that it has a transaction code CRM_BUPA_DC for cleansing cases.
    If anybody knows how to find the installation files and installation procedure, I will be very grateful.
    Regards,

    Hi Rahul,
    Sure, this can be easily configured.
    There is a BADI - ADDRESS_SEARCH which is used to implement duplicate checks on BP name + address. You can either write your own implementation or you can use the SAP provided implementation SIC_ADDRESS_SEARCH.
    You should also be able to find the relevant documentation with the BADI itself in SE18. You would also need to do some minor customizing to choose which fields should be checked for duplicate values. You can find this customizing in the IMG customizing (transaction SPRO) (Just search for duplicate check and the search will find the relevant node in the customizing menu)
    This should solve your problem.
    Cheers,
    Rishu.

Maybe you are looking for

  • Difference between void and null?

    wht is da difference between void and null w.r.t java?

  • Can't restore backup with old Apple ID

    Hi. I have changed the email address I use for my Apple ID, its the same account, but a different email is used as the user name.  Everything has appeared to be working fine.for some time, including the automated backups to iCloud. I then got a new i

  • Menu exit for va01/va02/va03

    Hi All, can anyone gives menu-exit for va01/va02/va03. Please give me screen-shots how to implement menu exit for va01/va02. Thanks, Dinesh

  • TC and Airport Express Alternative

    Greetings, Last night, I bought a TC to back up my 2 laptops. I currently had an Airport Express as my main wireless router in my living room, but also connected it to my stereo for Airtunes. Is there any USB device I can use to stream music from my

  • Can I save new bookmarks using Firefox to my imported IE Favorites List?

    I just installed Firefox as my browser and I imported my Favorites from IE. When I open the Bookmarks tab on Firefox I see my imported list at the bottom of the drop down. When I find something new to Bookmark, how do I get it to go into my previousl