2 Replies Latest reply on Jul 21, 2009 6:39 PM by Matt Kohanek

    Here is pseudocode, are there data types I need available fo

    Matt Kohanek Novice

      Someone tell me if there are data types I can use to get these results:

      //variable declarations that I dont know data types for which is what I need....
      
      OverAllTreeToHoldNodesDataType tree;
      NodeRootDataType rootNode;
      SubNodeDataType devicesNode;
      SubNodeDataType channelsNode;
      
      
      
      public void loadHtmlTree(){
      
       for (project : projectCollection){
       //operations to fill project class...
       rootNode=project.getProjectName();
       tree.addRoot(rootNode); //adds this projectname to the tree
      
       for(device: project){
       //operations to fill device class
       devicesNode=device.getDeviceName();
       tree.addFirstProjectChildren(devicesNode);
      
       for(channel: device){
       //operations to fill channel class
       channelsNode=channel.getChannelName();
       tree.addDeviceChildren(channelsNode);
       }
       }
       }
      }
      
      
      //setter and getter for OverAllTreeToHoldAllNodes tree variable




      i can do all the necessary operations, I just dont know what data types I can use to accomplish this or how to use them!!!

      Plus btw, the overall data type that will be used to hold all the nodes must be able to be bound to a rich:tree

        • 1. Re: Here is pseudocode, are there data types I need availabl
          Matt Kohanek Novice

          just to clarify, basically what that code does is it looks for projects in the project collection, and every time it finds one, it first adds the project name as the root. Then below that id adds all that projects devices, and below the devices it adds the channels that belong to that device.

          then it starts all over again and does this for every project it finds in the project collection

          • 2. Re: Here is pseudocode, are there data types I need availabl
            Matt Kohanek Novice

            that would actually be more like this now that I think about it, now if I can just find the data types to fit this and find out if they will work for a rich:tree:

            //variable declarations that I dont know data types for which is what I need....
            
            OverAllTreeToHoldNodesDataType tree;
            NodeRootDataType rootNode;
            SubNodeDataType devicesNode;
            SubNodeDataType channelsNode;
            
            
            
            public void loadHtmlTree(){
            
             for (project : projectCollection){
             //operations to fill project class...
             rootNode=project.getProjectName();
             tree.addRoot(rootNode); //adds this projectname to the tree
            
             for(device: project){
             //operations to fill device class
             devicesNode=device.getDeviceName();
             rootNode.add(devicesNode);
            
             for(channel: device){
             //operations to fill channel class
             channelsNode=channel.getChannelName();
             devicesNode.add(channelsNode);
             }
             }
             }
            }
            
            
            //setter and getter for OverAllTreeToHoldAllNodes tree variable