TreeTable determining parent node

Is it possible to determine whether a TreeTable row is the parent or child in an EL expression?
Thanks

you can have an attribute(isParent) in your tree model that define that i.e. in master view it will teturn 'true' and in detail 'false'.
then you can use it in el expression #{node.isParent}

Similar Messages

  • XMLTable.. how to reading the parent node..

    <CONTEXT>
    <UID>
    <id>23</id>
    <STARTTIME>01/01/2010</STARTTIME>
    <STOPTIME>01/31/2010 23:59:59</STOPTIME>
    <ACCOUNTID>
    <acctid>Ac1</acctid>
    <METERID>
    <namek>METER1</namek>
    <DETERMINANTVALUES>
    <value>
    <name>RECORDED_KWH</name>
    <reading_charges>13955.58</reading_charges>
    <cost>2.81</cost>
    </value>
    <value>
    <name>STRND_KW_CHARGES</name>
    <reading_charges>89.84</reading_charges>
    <cost>2.01</cost>
    </value>
    <value>
    <name>DEL_CHARGES</name>
    <reading_charges>891.84</reading_charges>
    <cost>5.29</cost>
    </value>
    </DETERMINANTVALUES>
    </METERID>
    <METERID>
    <namek>METER2</namek>
    <DETERMINANTVALUES>
    <value>
    <name>RECORDED_KWH</name>
    <reading_charges>139553.58</reading_charges>
    <cost>2.81</cost>
    </value>
    <value>
    <name>STRND_KW_CHARGES</name>
    <reading_charges>893.84</reading_charges>
    <cost>2.01</cost>
    </value>
    <value>
    <name>DEL_CHARGES</name>
    <reading_charges>8913.84</reading_charges>
    <cost>5.29</cost>
    </value>
                        </DETERMINANTVALUES>
                   </METERID>
                   </ACCOUNTID>
         </UID>
    </CONTEXT>
    This XML data is read and put into an XMLType variable. We want each meters different values to be different rows:
    select t.*
    from
    XMLTABLE('for $i in /CONTEXT/UID/ACCOUNTID/METERID/DETERMINANTVALUES/value return $i'
    passing var1
    COLUMNS
    detval1 varchar2(100) PATH 'reading_charges',
    meterid varchar2(100) PATH '../../name'
    ) t;
    but the meterid fetches null value .. how can we fetch
    uid1, accountid1, reading_charge1, cost1
    uid1, accountid1, reading_charge2, cost2
    uid1, accountid1, reading_charge3, cost3
    Edited by: user3178919 on Feb 10, 2010 7:49 AM

    Heres the formatted XML:
    <CONTEXT>
         <UID>
              <id>23</id>
              <STARTTIME>01/01/2010</STARTTIME>
              <STOPTIME>01/31/2010 23:59:59</STOPTIME>
              <ACCOUNTID>
                   <acctid>Ac1</acctid>
                   <METERID>
                        <namek>METER1</namek>
                        <DETERMINANTVALUES>
                             <value>
                                  <name>RECORDED_KWH</name>
                                  <reading_charges>13955.58</reading_charges>
                                  <cost>2.81</cost>
                             </value>
                             <value>
                                  <name>STRND_KW_CHARGES</name>
                                  <reading_charges>89.84</reading_charges>
                                  <cost>2.01</cost>
                             </value>
                             <value>
                                  <name>DEL_CHARGES</name>
                                  <reading_charges>891.84</reading_charges>
                                  <cost>5.29</cost>
                             </value>
                        </DETERMINANTVALUES>
                   </METERID>
                   <METERID>
                        <namek>METER2</namek>
                        <DETERMINANTVALUES>
                             <value>
                                  <name>RECORDED_KWH</name>
                                  <reading_charges>139553.58</reading_charges>
                                  <cost>2.81</cost>
                             </value>
                             <value>
                                  <name>STRND_KW_CHARGES</name>
                                  <reading_charges>893.84</reading_charges>
                                  <cost>2.01</cost>
                             </value>
                             <value>
                                  <name>DEL_CHARGES</name>
                                  <reading_charges>8913.84</reading_charges>
                                  <cost>5.29</cost>
                             </value>
                        </DETERMINANTVALUES>
                   </METERID>
              </ACCOUNTID>
         </UID>
    </CONTEXT>
    Expected output:
    UID-ID, ACCOUNTID-acctid, METERID-NAME, DETERMINANT-value-reading-charges
    23 Ac1 METER1 13955.58
    23 Ac1 METER1 89.84
    23 Ac1 METER1 891.84
    because if we do as shown below the meterid value comes as NULL (not able to go the parent node and get the values)
    select t.*
    from
    XMLTABLE('for $i in /CONTEXT/UID/ACCOUNTID/METERID/DETERMINANTVALUES/value return $i'
    passing var1
    COLUMNS
    detval1 varchar2(100) PATH 'reading_charges',
    meterid varchar2(100) PATH '../../name'
    ) t;
    IF we do 'for $i in /CONTEXT
    return $i//UID/ACCOUNTID/METERID/DETERMINANTVALUES/value'
    - will we be able to get the paret node value
    Can this be achieved using multiple XMLTable only can be achieved using single XMLTable?

  • Determine Hierarchy Node

    Hello,
    knows anyone how i can determine hierarchy nodes based on leafs?
    Example:
    Lvl   Item    Type
    1     10000 node
    2     11000 node
    3     11100 node
    4     11111 leaf
    4     11112 leaf
    2     12000 leaf
    Within a upload process on detail-level i have only the information that der characteristic is a leaf.
    For the chararterstic exists a hierarchy. The connection/relation between parent and child is at the /bic/H* table available. Now i have to determine based on the leaf (11112) the next 'higher' node (11110). Is it possible to determine this node and exists a standard FB or has anyone an idea to implement it within the update or tranformation rules?
    Thanks for advise.
    Edited by: Markus Linortner on Jan 24, 2008 9:27 PM

    Any idea????
    Edited by: Cristina Martillo on Nov 18, 2010 9:30 PM

  • 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.

  • BOM: Finding Children Nodes For a Given Parent Node

    Hi,
    I am trying to find the longest path for a particular BOM material. I am using the FM CS_BOM_EXPL_MAT_V2 to explode the BOM to get the materials (including children nodes etc.). I think, in this scenario, a recursive function would be the best way to go. The problem is to find the children nodes for a node in a particular level. Looking at the structure STPOX and the fields STUFE (Level), WGEXX (path) , TTIDX (index) and VWGEX (path, multi-level), I cannot find a logical way to link the children nodes to a parent node although visually I can see how things are connected when the FM returns the STB table..
    For example: TBL_STB returns from FM:
    STUFE     WEGXX     BMTYP     TTIDX     VWEGX     OJTXB
    1     1     M     1     0     MATXX1
    2     1     M     2     1     MATXX2
    3(a)     1     M     3     1              MATXX3     
    4(c)     1     M     4     1              MATXX4               
    4(d)     2     M     4     1              MATXX5     
    3(b)     2     M     3     1              MATXX6     
    4(e)     3     M     5     2              MATXX7     
    4(f)     4     M     5     2              MATXX8     
    Visually, we can tell that  Level 2 has one item 2, level 3 has 2 items, 3(a) and 3(b), Level 4 has 4 items where 4c and 4d are connected to 3a and 4e and 4f are connected to 3b.
    Going through STPOX structure itself, how can we find out that 4c and 4d belongs to assembly 3a but 4e and 4f belong to 3b??  If someone can explain the uses of the differnet indicators in STPOX (or other) where I can find out the children from the parent, it would be greatly helpful to write the recursive function..
    Thanks in advance..
    P.S. I will give points out immediately for any useful answers..
    Edited by: Shuvo Datta on Sep 10, 2008 6:17 PM

    Figured it out myself

  • How to add an item object as a child for a specified parent node in AdvancedDataGrid in Flex?

    Hi all,
              This is the code, to add a object as a child into a specified parent node in AdvancedDataGrid in flex.
    <?xml version="1.0" encoding="utf-8"?><mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onCreationComplete()" width="100%" height="100%">
    <mx:Script><![CDATA[
    importmx.controls.Alert; 
    importmx.collections.IHierarchicalCollectionViewCursor; 
    importmx.collections.IHierarchicalCollectionView;  
    importmx.collections.ArrayCollection; [
    Bindable]private var objectAC:ArrayCollection = newArrayCollection(); 
    //This method is used to construct the ArrayCollection 'flatData' 
    private function onCreationComplete():void{
    var objOne:Object = newObject(); objOne.name =
    "Rani"; objOne.city =
    "Chennai";objectAC.addItem(objOne);
    var objTwo:Object = newObject(); objTwo.name =
    "Rani"objTwo.city =
    "Bangalore";objectAC.addItem(objTwo);
    var objThree:Object = newObject(); objThree.name =
    "Raja"; objThree.city =
    "Mumbai";objectAC.addItem(objThree);
    //This method is used to add one object as a child item for the parent node 'Rani' 
    private function addChildItem():void{
    var dp:IHierarchicalCollectionView = groupedADG.dataProvider asIHierarchicalCollectionView;  
    varcurent:IHierarchicalCollectionViewCursor = groupedADG.dataProvider.createCursor();  
    var dummyParentNode:Object = {name:"Rani", city:"New Delhi"};  
    var obj:Object = null; 
    while(curent.current){
    // To get the current node objectobj = curent.current;
    // Add Child item, when depth = 1 and Node name should be "Rani" 
    if (curent.currentDepth == 1 && obj["GroupLabel"] == "Rani"){
    dp.addChild(curent.current, dummyParentNode);
    curent.moveNext();
    groupedADG.dataProvider = dp;
    groupedADG.validateNow();
    groupedADG.dataProvider.refresh();
    ]]>
    </mx:Script> 
    <mx:AdvancedDataGrid id="groupedADG" x="10" y="15" designViewDataType="tree" defaultLeafIcon="{null}" sortExpertMode="true" width="305" > 
    <mx:dataProvider> 
    <mx:GroupingCollection id="gc" source="{objectAC}"> 
    <mx:grouping> 
    <mx:Grouping> 
    <mx:GroupingField name="name"/> 
    </mx:Grouping> 
    </mx:grouping> 
    </mx:GroupingCollection> 
    </mx:dataProvider> 
    <mx:columns> 
    <mx:AdvancedDataGridColumn headerText="Name" dataField="name"/> 
    <mx:AdvancedDataGridColumn headerText="City" dataField="city"/> 
    </mx:columns> 
    </mx:AdvancedDataGrid> 
    <mx:Button x="10" y="179" label="Open the folder 'Rani'. Then Click this Button" width="305" click="addChildItem()" /> 
    </mx:Application> 

    Hi,
    It's not possible to 'append' a StringItem or a TextField (or any other lcdui.Item object) to a Canvas or GameCanvas. You can only draw lines, draw images, draw text, etc etc, on a Canvas screen. So, you can only 'simulate' the look and feel of a TextField (on a Canvas) by painting it and adding source code for command handling (like key presses). However, this will be quite some work!!
    lcdui.Item objects can only be 'appended' to a Form-like Displayable.
    Cheers for now,
    Jasper

  • How to avoid the selection of a Parent node and its child node at a time?

    Example:
    consider the below JTree.
    Parent1
    ---->Parent2
    -------->Child3
    Parent3
    ---->Parent4
    My requirement :
    Parent1 and Parent3 can be selected at a time(using ctrl keys)
    Parent2 and Parent4 can be selected at a time
    Parent1 and Parent2 should not allowed to select at a time.
    In general : A parent and any of its child should not be selected at a time.
    How to achieve this? Anyone please help me.

    Thanikai wrote:
    I am very sorry.Whatever for? It's a valid question.
    How do i implement a custom TreeSelectionModel?I would start by going through the source of DefaultTreeSelectionModel so see how the default selection is handled. Also probably check out JTree.EmptySelectionModel to see how selection is prevented.
    Which methods to override?Methods in the class you choose to extend, obviously. But before that you need to firm up certain design decisions: if a parent node is selected and the user attempts to select one of its child nodes, do you select the child and deselect the parent or do nothing/ and vice versa.
    etc.... may form the basis for a future, more specific question accompanied by a [_SSCCE_|http://mindprod.com/jgloss/sscce.html].
    luck, db

  • Af:tree Master child relation ,but showing child id's as parent node vice

    Hi ,
    Am using adf 11G 11.1.1.5
    I have a small requiement .
    Am using af:tree , where i display childId's . Onclick of child it i have to show popup with tree structure where i will show parentid as node and childId's as child nodes
    i have created view link between child and parent views.
    Now isssue is when i selected childId in table (i mean a checkbox is given where user check the child Id and fire button ).On dat action am calling popup with tree structure .BUT here childId's are displaying like Parent nodes and parentId's as child node.
    any suggestion . if want i will drop the code

    i knew somewhere i was messed up .
    There is only viewlink between, Parent and child .NO FK ,these are not related database table (Entity Object.).
    simple query's which are made from same table , but base on Parent/Root col i have show data in tree structure way.
    Just like
    ParentId Chilld id
    100 jhon
    100 max
    100 adam
    101 jack
    103 jill
    103 marven
    Now it will show in table like
    jhon
    max
    adam
    jack
    jill
    marven
    If i click max i mean check box and fire button , i have to show tree structure like below
    100
    jhon
    max
    adam
    As max parentid is 100 , i have to show all the childid which have 100 as parentid.
    any suggestion plz , me struck here to handel

  • Context Mapping: child-nodes of non-mapped parent nodes

    I am somewhat curious about Context Mapping in WebDynpro.
    Which parents nodes need to be mapped in order to map child nodes ? Does a child node has more than one parent node (e.g. grandparent - two steps above) ?
    A.1  -
    MAPPED----
    >    B.1
      - A1.1   NOT MAPPED
      - A1.2   NOT MAPPED
            - A.1.2.1     MAPPED TO>    B.1.2.4
            - A.1.2.2   NOT MAPPED
      - A1.3   NOT MAPPED
    Is it sufficient that only one of these parent nodes (e.g. direct parent node not mapped, but parent node of this parent node is mapped) need to be mapped so that the child node can be mapped ?
    Is this assumption true or not ?
    The SAP library states:
    "Conversely, child nodes of non-mapped parent nodes cannot be mapped, otherwise this would result in irresolvable conflicts at runtime with respect to the parent-child relation in the context and the mapping relation." (http://help.sap.com/saphelp_nw04/helpdata/de/51/a3384162316532e10000000a1550b0/content.htm)
    This statement is not absolutely clear on this issue.

    Let me put it this way
    You have a node vehicle and you have a child node for that the car. The car node have parameters car1, car2.
    Let the vehicle node have parameters veh1 and veh2
    Then if you map vehicle node one to any other node (say in the comp. controller) you have the option of mapping its children i.e veh1,veh2 and carnode.
    You can have that veh1 is mapped and veh2 is not mapped.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car node(may or may not be mapped)
    If instead you try to map only the car node the vehicle node will also get mapped automatically but not it's child parameters like veh1 and veh2.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car nodemapped)
    car1(may or may not be mapped)
    car2(may or may not be mapped)
    Hope this would help.
    Do revert for further clarification
    Regards
    Noufal

  • Parent nodes have themselves as childs, in contrast to BW hierarchy

    Hello Gurus,
    I have a problem concerning hierarchies and grouping in CR2008.
    Inserting the hierarchy works fine, but here's the problem:
    Every parent node has itself as child node, i.e. the hierarchy shown is:
    1
    1.1
    1.2
    1.2.2
    1.2.3
    instead of the correct:
    1
    1.2
    1.2.3
    That even occurs when I just include the Node ID, without any grouping and hierarchy settings.
    Such behaviour is undesirable for my purpose, so how can I make Crystal Reports behave like I expect/want? I am completely confused where these additional nodes are originating, as they are definitely not defined in the BW hierarchy. Therefore I suspect the problem somewhere in Crystal, although I have no actual evidence supporting this...
    Has anyone an idea how to solve that problem? I have crawled through SDN and unfortunately wasn't able to find a solution...
    Thanks!

    Hi Ingo,
    first I'd like to apologize for the late reply, I was very busy with another project during the last weeks.
    It seems to be the bookable nodes setting in the query, at least only such parent nodes are affected that have data posted to themselves. Obviously, the actual parent node as shown in Crystal is the one with data aggregated by Crystal and the child node is the one with the data that was posted to the node.
    I'll try to find some free time during the remainder of the week for further investigation and provide additional feedback.
    Thanks for your help so far!

  • Parent node showing in schema when child nodes not present

    I had several folks answer my questions on mapping from a flat file to an EDI 835 schema and I am down to just a couple of issues before I finish up. I have a conditional mapping issue that I have to solve before I can map the rest of the document. I am
    mapping three fields in a single non-repeating line in the flat file to a repeating segment in the 835. Basically I need to create a separate AMT_ClaimSupplementalInformation segment for each field in the flat file line. As you can see in the picture
    below I want to create a AMT_ClaimSupplementalInformation segment for CDISCOUNT, CINELIGIBLE and CALLOWED.
    You can see I have quite a bit of conditional logic attached to the three fields, but I have all three connected via a loop to the AMT_ClaimSupplementalInformation parent. I cannot attach the loop to the parent of the three fields because it only appears
    once in the file. And if I leave the loop out the AMT segments get stacked funny, like this:
    <AMT_ClaimSupplementalInformation>
    AMT1
    AMT1
    AMT2
    AMT2
    </AMT_ClaimSupplementalInformation>
    You can see how they should be stacked in the next pic.
    In some cases however, one of those fields may be blank so I will not need to create a AMT_ClaimSupplementalInformation segment for it. I was able to use some conditional mapping ideas you guys gave me using the Not-Equal and Value Mapping functoids, and
    that works great to keep blank child nodes from being created. However, Since I have a loop attached to the AMT_ClaimSupplementalInformation parent node it still creates an empty parent node even when the child nodes are not created. See the empty parent
    node in the pic below.
    Since looping functoids can only be attached to links I don't know how to make the parent node conditional.
    Any suggestions?
    Thanks.

    Boatseller, thanks for the tip. I did end up going the XSLT direction. It's a bit of a hack, but I'm using the following XSLT to eliminate empty nodes :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="@*|node()">
            <xsl:if test=". != ''">
                <xsl:copy>
                    <xsl:apply-templates select="@*|node()"/>
                </xsl:copy>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    I created a new map with the 835 schema on each side. I then created an XSLT file and pointed to it in the Custom XSLT Path property. It seems to work well. I call this map right after my FlatFile_To_835 map.
    I was hoping to use the scripting functoid with inline XSLT in the map so that I didn't have to worry about deploying the XSLT file(just another thing to keep up with in the future), but when I compile it I get the following error:
    The "Scripting" functoid has 1 input parameter(s), but 2 parameter(s) are expected.
    I'm wondering if I'm connecting the schemas incorrectly in the map:
    In any case, I'm past the empty nodes issue for now, which was a big roadblock. Now I have to deal with the CAS segments which are, as you said, a real pain. 
    Thanks for all of your input.

  • Runtime ik springs: child nodes break when a parent node is moved

    There is something wrong with IK armature springs when used in runtime mode. Child nodes become disjointed with user interaction of parent nodes.
    Drag spring on right from different points to see bug here: http://gardenofpossibilities.org/flash/ik_spring_runtime_bug/spring_runtimebug.html
    I filed this as a bug, but wanted to mention it here in case others have a similar problem or anyone has a workaround:
    Steps to reproduce bug:
    1. Build simple movieclip based armature
    2. add springs to bones
    3. set armature to runtime and publish
    Results:
    Armature child nodes become disjointed with user interaction of parent nodes. Same disjointed behavior occurs when armature is moved with actionscript 3 ik.mover.
    Expected results:
    Armature nodes should remain properly connected when user or actionscript 3 ik_mover moves any node.
    My Analysis:
    When springs are 0 (no spring) armature works correctly. It appears that the problem is caused by child nodes pivoting at parent node head, when they should actually pivot at parent node tail. Also, when armature becomes disjointed, dragging or moving tail node (furthest from root) restores joints.
    I've posted and example of the bug here: http://gardenofpossibilities.org/flash/ik_spring_runtime_bug/spring_runtimebug.html
    ...and a .zip archive of the fla: http://gardenofpossibilities.org/flash/ik_spring_runtime_bug/
    Please enlighten me on what is wrong, how to fix (if possible). If this is a documented bug, please provide a reference to it.
    Thanks!

    I posted this two months ago. Does anybody have anything to add on this issue? Are there any Adobe programmer/engineers out there? I've even filed a bug report, but have not received any feedback. Not a peep. Please?

  • How To Display  attributes of Child Node and Parent Node in same view

    Suppose I have two view Carview and CarDetail View...IN Component context I have Parent Node Called Cars and It have its attribute as Price,Warranty,Year and also One Child Node Called as Brand Name Whose attribute are PrimaryBrand and SecondaryBrand..Now If I do Mapping of My First View i.e CarView with Child node of BrandName..and then I Have To Show Whole Detail of Car in CarDetailView.......How Can I Achieve it..

    Hi Vinay,
    You can map the child node and even the paren tnode to the same view if u want to display in the same window..
    If not if ur requirment is to dispaly in the sme view but should not map the child and parent to the Same view then you can take another new view.. and insert 2 view containers and then add the Child view and parent view in that view containers and then Diaplay the newly created view.
    Regards,
    Raju Bonagiri

  • Hierachy parent node retrieval

    Hi,
    I wanted to get the parent node name for the given node. Suppose If I go to Hierarchy table of profit center and enter a node name, it will display the parent id. from there, I would like to get the parent id's node name. How is it possible? is there any function module which gives the parent node if we give the node name ? I have checked the below function modules but not got  the required output.
    RRH1_HIERARCHY_HELP_VALUES_GET
    RSNDI_SHIE_STRUCTURE_GET3
    Please let me know if you have any ideas on this.

    Hi,
    check the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6729e07211d2acb80000e829fbfe/frameset.htm
    plus check the following threads, they explained good.
    Hierarchy Loading from R/3 to BW
    How to create a hierarchy datasource in R/3

  • FTREE_NODE: Find parent node which has no child nodes

    Hi guys
    Does anybody know how to find a parent node which has no child node(s)?
    I couldn't find any build-in at the online help. Is there a trick to got this?
    Thanks in advance
    Remo

    Hi Remo,
    I misspoke, in my earlier post. The FTREE built-in has defined constants for the possible values that FTREE.NODE_STATE can have -- FTREE.COLLAPSED, FTREE.EXPANDED and FTREE.LEAF_NODE.
    If you wish, rather than testing for a value of '0', you can instead test for a value of FTREE.LEAF_NODE. Both are functionally identical, but using the constants can improve the readability of your code, eliminating the need for additional comments.
    Eric

Maybe you are looking for

  • Best way to update AC97 audio drivers?

    Is the best way to update AC97 audio drivers = dl. from msi the latest drivers which are 5.10.00.5970 (A3.80) I currently have 5890. Then uninstalling old ones from add-remove programs then install newest ones. Since live update doesn't seem to get i

  • TopLink doesn't support JAXP 1.1 ?!?

    Does anyone know when Toplink is going to support JAXP 1.1? It seems to be using old xerces-1 type objects, but when I try to use xml-apis.jar, it doesn't work. - Rustam -

  • Portal self registration - modifying email messages sent from database

    Hi, Using Self Registration feature of Portal, we need to modify the text sent to approved users by email. current message: The account that you requested at https://mysite/portal/pls/portal/ has been approved. You may now log on to the portal using

  • Magic mouse and aluminum wireless keyboard not working in windows 7

    Aluminum wireless keyboard (fully upgraded firmware as of 2/19/2010) not working, or magic mouse. Both from Apple Store, not amazon or ebay. No error shown for magic mouse, only "connecting to device" for 15 minutes now. With keyboard, at times it sh

  • Installing iso images from CD

    Very green user to Solaris, I use Linux. I've heard so much about Solaris that I wanted to try it. I burned the iso images to CD. Must I boot from CD to install or do something else? This is Solaris 10 on the x86 platform. Please reply to [email prot