Get Child node rowkey of a richtreetable in Javascript

Hello,
I ve been trying for a while now and any help is greatly appreciated.
Using Javascript, when clicked on a tree node, i would like to traverse to the first child node and get the rowkey.
Thanks.

Hi,
Basically, we have a rich tree table with child nodes as well.
When a user discloses a node, the selected row key stays at the top node but i would like to focus it on the child node.
We already do that through managed bean ((JUCtrlHierNodeBinding)node.getChildren().get(0)) but on the client side, it s still not making child node as selected
even though in the bean, we have tree.SetSelectedRowKeys with the child node.
So, our CSS highlight on the child node goes away once we do any other click.
This does not happen if we click on the child node specifically.
Hence , we would like to do that traverse down at script level as well and do the selection part.
Another problem with this is that since the top node behaves as selected(which is correct bcos the expand-collapse is at the top node and we click that icon), user is not
able to click on top node to see some other data.
Pls guide me on this where i ve gone wrong.
and i do have addPartialTarget code in the bean as well but it s not behaving the way we want.
Thanks.
Edited by: Jay on Apr 7, 2011 10:19 AM

Similar Messages

  • OLAP API to get child nodes ?

    Hi, I am new to OLAP API (Java), I spend some months in Hyperrion Essbase JAPI, now turn to Oracle but feel quite confused about a lot of concept. Here is a task in my hand that is to present the dimension tree in XML format, just like:
    <?xml version="1.0" encoding="GBK"?>
         <Member name="Market" gen="1">
              <Member name="East" gen="2">
                   <Member name="New_York" gen="3" />
                   <Member name="Boston" gen="3" />
                   <Member name="Chicago" gen="3" />
              </Member>
              <Member name="West" gen="2">
                   <Member name="San_Francisco" gen="3" />
                   <Member name="Seattle" gen="3" />
                   <Member name="Denver" gen="3" />
                   <Member name="Los_Angeles" gen="3" />
              </Member>
              <Member name="South" gen="2">
                   <Member name="Dallas" gen="3" />
                   <Member name="Houston" gen="3" />
                   <Member name="Phoenix" gen="3" />
              </Member>
         </Member>
         <Member name="Product" gen="1">
              <Member name="Audio" gen="2">
                   <Member name="Stereo" gen="3" />
    I didn't find ways on how to get child nodes for a given node, for example, how can I get East,West,South,North nodes (called "member" in Essbase) from "Market" node?

    Hi, I am new to OLAP API (Java), I spend some months in Hyperrion Essbase JAPI, now turn to Oracle but feel quite confused about a lot of concept. Here is a task in my hand that is to present the dimension tree in XML format, just like:
    <?xml version="1.0" encoding="GBK"?>
         <Member name="Market" gen="1">
              <Member name="East" gen="2">
                   <Member name="New_York" gen="3" />
                   <Member name="Boston" gen="3" />
                   <Member name="Chicago" gen="3" />
              </Member>
              <Member name="West" gen="2">
                   <Member name="San_Francisco" gen="3" />
                   <Member name="Seattle" gen="3" />
                   <Member name="Denver" gen="3" />
                   <Member name="Los_Angeles" gen="3" />
              </Member>
              <Member name="South" gen="2">
                   <Member name="Dallas" gen="3" />
                   <Member name="Houston" gen="3" />
                   <Member name="Phoenix" gen="3" />
              </Member>
         </Member>
         <Member name="Product" gen="1">
              <Member name="Audio" gen="2">
                   <Member name="Stereo" gen="3" />
    I didn't find ways on how to get child nodes for a given node, for example, how can I get East,West,South,North nodes (called "member" in Essbase) from "Market" node?

  • Getting child nodes using sax

    How can i get the value of childnodes in java using sax?

    Just wait a while. The child nodes will be passed to you after the parent nodes. Of course, you will have to keep track of which child nodes of which parent elements you want, but you probably know this already. If you want to process the entire file first and then decide which child nodes are of interest, read up on one of the DOM-ish approaches.
    Dave Patterson

  • Can't get child node in tree selection listener

    I am making a fusion web application using JDeveloper 11G (11.1.1.2.0).
    I have created two view objects linked together. Let's call them VoDepartments and VoEmployees, linked on DepartmentId.
    I hava made a tree with a af:switcher
    <af:switcher id="s1" facetName="#{node.hierType.structureDefName}">
    <f:facet name="view.VoDepartments">
      <af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    <f:facet name="view.VoEmployees">
      <af:outputText value="#{node}" id="ot2"/>
    </f:facet>
    </af:switcher>I made a selection listener based on a guide by Frank Nimphius
    RichTree tree1 = (RichTree) selectionEvent.getSource();
    RowKeySet rks2 = selectionEvent.getAddedSet();
    Iterator rksIterator = rks2.iterator();
    if (rksIterator.hasNext()){
      List key = (List)rksIterator.next();
      JUCtrlHierBinding treeBinding = null;
      treeBinding = (JUCtrlHierBinding) ((CollectionModel)tree1.getValue()).getWrappedData();
      JUCtrlHierNodeBinding nodeBinding = nodeBinding = treeBinding.findNodeByKeyPath(key);
      String nodeStuctureDefname = nodeBinding.getHierTypeBinding().getStructureDefName(); //Here is the nullpointerexception for employees
      String employees = "view.VoEmployees";
      String departments = "view.VoDepartments";
      if (nodeStuctureDefname.equalsIgnoreCase(departments)){
       String dept = (String) nodeBinding.getAttribute("Department_name");  
       System.out.println("Department = "+dept);
      else if (nodeStuctureDefname.equalsIgnoreCase(employees)){
       String emp = (String) nodeBinding.getAttribute("First_name");  
       System.out.println("Employee = "+emp);
      else{
       //what the heck did the user click on? Ask him ;-)
    }Pagedef:
    Executables:
    <iterator Binds="VoDepartments2" RangeSize="25" DataControl="AppMainDataControl" id="VoDepartments2Iterator"/>
    Bindings:
    <tree IterBinding="VoDepartments2Iterator" id="VoDepartments2">
    <nodeDefinition DefName="view.VoDepartments" Name="VoDepartments20">
      <AttrNames>
       <Item Value="DepartmentId"/>
      </AttrNames>
      <Accessors>
       <Item Value="VoEmployees"/>
      </Accessors>
    </nodeDefinition>
    <nodeDefinition DefName="view.VoEmployees2" Name="VoDepartments21">
      <AttrNames>
       <Item Value="First_name"/>
       <Item Value="Last_name"/>
      </AttrNames>
    </nodeDefinition>
    </tree>The tree works just fine and list all it should list. I can click the department and my selection listener print the departments name in the console.
    I can expand a department and list all employees. The problems is when I click an employee, I get null pointer exception.
    I have found out that the selectin listener can't find nodeBiding for employees. So nodeBinding.getHierTypeBinding().getStructureDefName(); throw NullpointerException.
    Anyone have an idea of what's wrong? Please help.
    -Thomas
    Edited by: Thomas H on Mar 22, 2010 8:21 AM

    Hi,
    if you open the tree binding editor, it has an entry "Target Data Source" for each of the node levels that you can use and point to an iterator binding representing the node. Not sure if this solves the issue, but chaces are.
    1. create an iterator for a child VO (using the not dependent child VO instance)
    2. Edit Target Data Source for the binding to e.g. ${bindings.EmployeesView1Iterator}
    Frank

  • Get child nodes and only child nodes from a tree?

    Hi all,
    Relatively simple table
    create table replaced_parts
    old_part_number varchar(7),
    replaced_part_number varchar(7),
    updated_date date
    insert into Replaced_parts values('AAAAA/1', 'BBBBB/1', '2012-Feb-16');
    insert into Replaced_parts values('BBBBB/1', 'FFFFF/1', '2012-Feb-23');
    insert into Replaced_parts values('YYYYY/3', 'ZZZZZ/3', '2012-Mar-17');
    insert into Replaced_parts values('FFFFF/1', 'LLLLL/1', '2012-Mar-18');
    insert into Replaced_parts values('LLLLL/1', 'HHHHH/1', '2012-Mar-19');The question is how do I issue a select using 'AAAAA/1' and get the result 'HHHHH/1'
    i.e. (A... -> B, B->F, F->L, L->H)
    and select using 'YYYYY/3' to get 'ZZZZZ/3' (Y... ->Z)?
    It would be really nice if I could also get my original value, say, 'CCCCC/1' if there is no entry
    for 'CCCCC/1' in the replaced_parts table (maybe NVL?).
    I have googled and tried various combinations of CONNECT BY, PRIOR, ISLEAF... &c. but
    am beating my head off a brick wall at the moment.
    TIA,
    Paul...

    >
    Hi, Paul,Hi again Frank - couldn't sleep and am back at the "£$%^&* computer...
    Yeah - it's a pity they weren't correct - I'll make doubly sure in future - see
    my edited post (with DROP TABLE commands inter alia - I also removed
    Order_Parts.User_Number since it was redundant - all that's needed is
    Order_Number (normalisation) so now your SQL doesn't work - sorry
    about that.
    Just saying something "doesn't work" isn;t very helpful. What exactly is wrong with the SQL
    statements I posted? Point out a couple of places where they are wrong, and explain how
    you get the right results in those places.Nothing is wrong with your SQL - I meant *sorry* about the confusion in the DDL/DML from my end.
    Now, I'm sorry again about the ambiguity of my English.
    I'll reconstruct the original data that I gave you and re-run your SQL against that data - again,
    this is *totally* my fault.
    My tables creation script seems to work fine now - I've edited my reponse to Solomon - the definitive scripts
    are now there - with Order_Parts.User_Number gone and the TO_DATE(...) as
    you suggested - the VARCHARs seemed to give the right result though - but I
    agree that if there's a correct way of doing it, then it should be done that way.
    Remember why you need to go to the trouble of posting CREATE TABLE and INSERT statements
    for some sample data here. It's to allow the people who want to help you to re-create the prolem
    and test their ideas. I know, and that's why I did it - the OR REPLACE that I added (stupidly and without thinking or testing) was
    so that people wouldn't have to go to the trouble of dropping the tables - I have now added
    DROP TABLE blah... to the beginning of the script so it won't be necessary.
    I have over 600 posts on this forum and only 26 questions - most of my time
    spent here is trying to help (to the best of my limited ability - I'm not a guru
    like yourself) and learning - it's amazing the number of times problems that
    I've seen here have subsequently arisen at work - and I am frequently
    frustrated by some posters' inability to explain their problem or at least give test
    cases.
    I can forgive bad English (except my own) - not everybody is a fluent speaker of the language,
    but SQL should run no matter what language one speaks.
    I appreciate that people are volunteering their time and effort here and I really do
    try and make it as easy as possible for them when I ask questions - I messed up
    this time, I'm afraid. It might also be the fact that I'm moving between SQL*Plus
    and SQL Developer and a text editor that I got confused (plus, fatigue didn't help...)
    In general, other people are not going to test anything on your system. I'm going to test
    things on my system, Solomon will test things on his system, and other people will test things
    on other systems. Well, if ever you're in Dublin ;). Again, I appreciate the effort that you, Solomon and sKr have
    gone to in helping me.
    Your INSERT earlier statements did not work on my system, because you were using a VARCHAR2
    in a place where a DATE was required. The correct thing to do is to use DATEs where DATEs are required. Indeed, and I agreed with you that if there's a right way of doing it, then it should be done that way.
    If your NLS settings are such that this is not causing you any errors right now, it's still a good
    idea for you to fix it; but, at any rate, whether it works on your system isn't what's important in
    this case; you're posting it to run on other peoples' systems.Ahhh.... <the blinding light of a moment of epiphany descends on Paul> I didn't realise it was
    an NLS setting - of course Americans will be different - it's just that I thought that YYYY-Mon-DD
    worked everywhere (I tried to avoid the day-first/month-first pitfall ) but now that you've explained
    it to me, I'll *never* make that mistake again.
    Yes - my mistake - I've now corrected the error
    Where are the desired results? Don't merely hide them in an old message; post them in a new message.OK. I'll put it in a reply to this post. I really am endeavouring to be as clear as possible - please
    excuse my errors - I will do better in future. I'm also very annoyed at my own incompetence and at
    having put you to more trouble than you would have had to go to if I had my wits about me.
    - should I keep Order_Parts.User_Number even
    if it isn't conformant to normalisation rules?
    If you have a good reason, it's okay to store de-normalized data. For example, some address tables in
    the US contain both state and ZIP code, even though state is fucntionally depenedent on ZIP code. I think that in this case, denormalisation is not called for.
    Re. the ZIP code thing, yeah, sure AIUI, the first two digits are dependent on the state, but the
    last three? They're more or less random - at least in the sense that there's no way to type
    in an address and calculate (mathematically, using a formula) them - so unless one were
    to have weird SQL lookups to a "State" table for the first two digits and then take the final
    three from a user-entered string field, then do a TO_CHAR on the returned 2-digit state number and add
    this to the 3-character one - I can't see how the ZIP code is an example of this? But, maybe
    (unless you wish to discuss that) we're getting side-tracked. Perhaps I'll ask this question
    on comp.databases.theory?
    Oracle actually added a new feature in version 11 (virtual columns) to make de-normalizing easier.Hmmm... is adding virtual columns denormalisation per se? My favourite "cheap'n'cheerful"
    db server (Firebird) has had a COMPUTED BY clause (same idea) for yonks (> 12yrs) - no data
    is actually stored - rather it is calculated on the fly. Another one for comp.databases.theory
    perhaps?
    BTW, wouldn't triggers remove all this hassle? It was my first idea, but trying to do it
    purely through SQL is now *obsessing* me ;)
    That would be another example of de-normalization. If the benefits of doing that outweigh the
    costs, then go ahead. A trigger will take some effort to maintain, and it will make all DML slower, regardless
    of how often that derived value is needed. Having the extra column will make some queries simpler and faster. Disk is cheap. Have an Original_Orders table (never changes) and a Revised_Orders table. When
    a part replacement occurs - for orders that haven't been fulfilled (boolean flag?), change the
    old part number to the new one. I can't imagine that replacement occurs very frequently, so
    the expense of a trigger would IMHO be minimal - plus the down side of any trigger would
    be mitigated by greatly simplifying the production of the Revised_Orders report?
    ... I'll experiment with what you've given me so far - but it's 23:40 here now, so I won't
    get a chance to do it tonight - unfortunately, I *do* have to sleep.
    If you haven't tested it yet, why did you start this message saying "your SQL doesn't work"?Sorry - what I meant was it obviously doesn't work when this eejit (i.e. me) has changed
    the table structure - I did run it quickly (your 1st statement) against the (revised table
    structure, the one you hadn't seen and I don't think even a man of your great SQL talents
    can be expected to write working queries against unknown table structures :)).
    Again, thanks for your help so far - I'll post the *_correct_* DDL and DML as a reply to this post
    with the desired result. I'll also reconstitute the old (i.e. the one you worked against) tables
    and data and let you know - again as a reply to this post - if I can at least learn something
    from my fiasco, it won't have been a total waste of my time, and again, apologies for
    wasting yours.
    Thanks again and rgs.
    Paul...
    Edited by: Paulie on 22-Mar-2012 02:50

  • How to get Parent nodes and corresponding child nodes in BI Hierarchy

    Hi all,
    I have a standard function module 'RSNDI_SHIE_STRUCTURE_GET3'  to get child node if i pass parent node. But I need child nodes along with the provided parent node as I use this in a loop in BI.
    Thanks

    Could any one help me in this regards .
    Thanks in advance
    Regards,
    sri

  • HOw to get parent node name value through its child node?

    Hi,
    Experts,
    I am able to get child node name values but according to attribute name value i want to  get its parent name value how to achieve that. For that i have used If_Ixml_element->Get_parent. Please pass some idea on it.
    Thanks in advance,
    Shabeer ahmed.

    Hello Shabeer
    I think the coding should be straightforward:
    DATA: lo_element   TYPE REF TO if_ixml_element,
              lo_child        TYPE REF TO if_ixml_node,
              lo_parent      TYPE REF TO if_ixml_node.
    " NOTE: LO_ELEMENT holds your child node
      lo_child ?= lo_element.
      lo_parent = lo_child->get_parent( ).
    Regards
      Uwe

  • Getting the value of a child node in an array

    How do you get the value of a child node in an array titled "entries"?  I used to do this in AS2, and now I'm trying in AS3.  To top it off, I'm forced to use an XML format I'm unfamiliar with.  So I'm not sure how to access these nodes in AS3.  An example of the XML is;
       <Row>
        <Cell><Data ss:Type="String">Absorption Areas</Data></Cell>
        <Cell><Data ss:Type="String">Drain fields where left over liquid from the septic system soak into the ground.</Data></Cell>
       </Row>
    How would I access ether of the <Cell> rows?
    Thanks

    Given that you declared ss namespace (otherwise it will throw an error) you have two options:
    xml.Cell[0].Data - will output:
    Absorption Areas
    xml.Cell.Data will output:
    <Data ss:Type="String">Absorption Areas</Data>
    <Data ss:Type="String">Drain fields where left over liquid from the septic system soak into the ground.</Data>
    So, xml.Cell.Data[1] will output:
    Drain fields where left over liquid from the septic system soak into the ground.

  • Getting list of possible child nodes

    I'm trying to find an automated way to get a list of all the possible child nodes for a given element based on a schema. How does one go about doing that in Java? The closest match I could find was the class ElementEditAS, but it's deprecated with no mentioned replacement or alternative.
    Any help would be greatly appreciated.

    You are right, but what may seem simple is not.
    1) You can have combinations of choice and sequence constructs in the contents.
    2) The element definitions are just references to true definitions somewhere else.
    3) You can include other schema files, so you need to work with an arbitrary number of files at the same time.
    Basically, all you have to do is read one or more schema files as XML files, probably using DOM or JDOM or whatever you know. Avoid SAX, since you need the full tree structure of the schema file.
    Having done something similar, be aware that element names are described in attributes of the element tag, and attributes are defined as elements. Be ready to redo your code a time or two because the names you use (attribute and element) are not working as you expected.
    Dave Patterson

  • Xpath: get attributes from first child node

    Hi,
    I have some problems by getting the attributes from the first child node, if i try to get child elements everything works fine, but whenever i need the elementvalue from a node with attributes i doesn't return anything.
    The xpath expression works fine if i want to get the element value from all childs, but not when i just want from one of them.
    This one works,
    XPathFactory factory1 = XPathFactory.newInstance();
        XPath xpath = factory1.newXPath();
        xpath.setNamespaceContext(new PersonalNamespaceContext());
        XPathExpression expr
         = xpath.compile("//default:DeviceExchange[1]/default:Status/text()");
       // gets the value of the node picked out
        Object result = expr.evaluate(doc, XPathConstants.NODESET);
        NodeList nodes = (NodeList) result;
        for (int i = 0; i < nodes.getLength(); i++) {
          names[i] = nodes.item(i).getNodeValue();
          String a = names;
    // checks if status is exchanged, if it is sets status to 1
    if (a.length() == 9){
    names[i] = "1"; }
    else{  names[i] = "0";}
    System.out.println(names[i]);This doesn'tXPathFactory factory2 = XPathFactory.newInstance();
    XPath xpath2 = factory2.newXPath();
    xpath2.setNamespaceContext(new PersonalNamespaceContext());
    XPathExpression expr2 = xpath2.compile("//default:DeviceExchange[1]/default:Field[@names='MLPKTID']/text()");
    Object result2 = expr2.evaluate(doc, XPathConstants.NODESET);
    NodeList nodes2 = (NodeList) result2;
    for (int i = 0; i < nodes2.getLength(); i++) {
    names2[i] = nodes2.item(i).getNodeValue();
    System.out.println(names2[i]);}Does anyone have any ideas? I will apreciate all help!
    Edited by: fusen on Oct 25, 2007 1:12 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sorry, solved myself. Just � typo that that i couldn't detect.

  • How do I create multiple types of child nodes in ADF  Faces Tree Component

    Hi,
    I am trying to construct a tree using ADF Faces. The tree I am trying to develop should look something like:
    - Departments
    + Dept 10
    + Dept 20
    + Dept 30
    + Dept 40
    - Employees
    + SCOTT
    +ALLEN
    + BLAKE
    The nodes shown at the top level should serve as labels, indicating the various types of nodes available.
    I have created the top level RootLabelsViewObj, with a SQL clause:
    select rn, node_label
    from (
    select 1 rn
    , 'Employees' node_label
    from dual
    union all
    select 2 rn
    , 'Departments' node_label
    from dual
    union all
    select 3 rn
    , 'Bonusplans' node_label
    from dual
    I have created ViewLinks between the RootLabelsViewObj and the DeptView and EmpView respectively (created on top of DEPT and EMP table in SCOTT schema), based on the LABEL attribute in the RootLabelsViewObj and with ViewLink SQL specified like:
    :Bind_NodeLabel = 'Departments' for the link with DeptView and :Bind_NodeLabel = 'Employees' for the link with EmpView.
    In the ADF BC Application Module Tester, I get exactly what I want.
    However, when I create a JSF JSPX page and drag the RootLabelsViewObj from the Data Control Panel to the page as ADF Tree, I run into a little issue: it seems like I cannot create a second Branch Accessor rule for the RootLabelsViewObj1: I have created a first Branch Accessor Rule referring to DeptView and now try to create a second one for EmpView, to allow Employees to be displayed under the root label "Employees" - but I cannot.
    The PageDefinition looks like:
    <tree id="RootLabelsViewObj1" IterBinding="RootLabelsViewObj1Iterator">
    <AttrNames>
    <Item Value="Rn"/>
    <Item Value="NodeLabel"/>
    </AttrNames>
    <nodeDefinition DefName="model.RootLabelsViewObj"
    id="RootLabelsViewObjNode">
    <AttrNames>
    <Item Value="NodeLabel"/>
    </AttrNames>
    <Accessors>
    <Item Value="DeptView"/>
    </Accessors>
    </nodeDefinition>
    <nodeDefinition DefName="model.EmpView" id="EmpViewNode">
    <AttrNames>
    <Item Value="Ename"/>
    </AttrNames>
    </nodeDefinition>
    <nodeDefinition DefName="model.DeptView" id="DeptViewNode">
    <AttrNames>
    <Item Value="Deptno"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    Does anyone know:
    - whether it is possible (intended) to have more than one branch accessor per node (i.e. more than one type of child under a node in the tree)
    - if so, how this can be achieved?
    Right now it looks like I am limited to each node in the tree having only one type of child node.
    Please tell me I am wrong.
    best regards,
    Lucas

    Give this a shot mate
    event.getNativeEventTarget();That will allow you to access the DOM object directly
    Id can be retrieved via
    event.getNativeEventTarget().id;

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • How to find out if a NODE has any CHILD NODES in a hierarchical tree?

    I want to find out programmatically if a node in a tree has CHILDREN.
    My requirement is this: I want to only show nodes for which the user has permission to execute the program that node is associated with.
    Problem is, my tree population query will not show the child nodes, BUT the sub-menu nodes are displayed and I need to get rid of these nodes.
    There is a function to find out the PARENT of a tree node (FTree.Get_Tree_Node_Parent), but noting to find out if children exist for a node or not?
    What I thought of was to display the tree and then traverse it from the ROOT onwards and then if a NODE is a submenu node (I can find this out by checking the PROGRAM value. If this is NULL it is a sub-menu node) and IF IT HAS NO CHILD NODES then I can delete the node.

    Please provide the examples with DATA
    as far as i know we cannot get the Child Nodes but NODE's Parents we can get
    parent_node := Ftree.Get_Tree_Node_Parent(htree, :SYSTEM.TRIGGER_NODE);I faced the similar problem but i solved it with query.
    Provide the data and your Tree query then we can help

  • Regarding : Creation of child nodes in a outlinefield

    Hi,
    I am facing a few problems in creating a child node. I read elements from an array to populate the outline field. The array has exact definitions as to what should be a parent and child respectively. While I am able to create nodes at the parent level, I am unable to create child nodes for any parent. I discovered that the value for the parent node is getting lost. I have tried to use some of the methods to arrive at the parent node, but to no anvil. Could some one suggest how exactly to get the value of the parent node so that the child node can be assigned to the parent.
    Thanks In advance.
    Balasubramaniam Sures
    [email protected]
    P.S : I have seen the examples Simple Outline field and File Browser. No clues from here.

    I take it that you are traversing through the array and loading each
    element into the OutlineField. At the risk of stating the obvious, for
    each element you must also identify it's parent. This is necessary to
    set the relationship from the child to the parent or vise versa.
    If you are already doing this and are still having difficulty, the
    problem may be as simple as setting the IsFolder property of the parent
    node. Unless this is done, it's child nodes will not be visible.
    Van Vuong
    Lead Technical Analyst
    Office: 972.985.5289
    VoiceNow: 972.330.0822
    Internet: [email protected]
    PAGE NET
    From: bala[SMTP:[email protected]]
    Sent: Friday, October 03, 1997 12:32 PM
    To: '[email protected]'
    Subject: Regarding : Creation of child nodes in a outline field
    Hi,
    I am facing a few problems in creating a child node. I read elements from an
    array to populate the outline field. The array has exact definitions as to
    what should be a parent and child respectively. While I am able to create
    nodes at the parent level, I am unable to create child nodes for any parent.
    I discovered that the value for the parent node is getting lost. I have
    tried to use some of the methods to arrive at the parent node, but to no
    anvil. Could some one suggest how exactly to get the value of the parent node
    so that the child node can be assigned to the parent.
    Thanks In advance.
    Balasubramaniam Sures
    [email protected]
    P.S : I have seen the examples Simple Outline field and File Browser. No
    clues from here.

  • How do you get a Node's text value using DOM?

    Hi,
    Can anyone tell me how I can extract the text values from <currency>, <Handle>, <shortcut> and <source> tags?
    This is my Code
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    public class CurveConfSave{
    public static void walkover(Node n){
    if( n.getNodeType() == Node.ELEMENT_NODE){
         System.out.println("Walking over: " + ((Element)n).getNodeName());
         for( Node c = n.getFirstChild();c != null;c=c.getNextSibling()){
              walkover(c);
    public static void main(String[] args) {
    try {
    DOMParser p = new DOMParser();
    p.parse("CurveConf1.xml");
    Document doc = p.getDocument();
    NodeList liveCurvesNodeList = doc.getElementsByTagName("LiveCurves");
    System.out.println("Num items: " + liveCurvesNodeList.getLength());
    // Get the first node from the node list
    Node liveCurvesNode = liveCurvesNodeList.item(0);
    System.out.println("Live Curves Node: " + liveCurvesNode.getNodeName());
    walkover(liveCurvesNode);
    } catch (Exception ex) {
    System.out.println(ex);
    This is the xml chunk that I want to mainpulate
    <LiveCurves>
    <dd.enumerate>
    <AUD>
    <Currency>AUD</Currency>
    <Handle>GregB_AUD.today.</Handle>
    <Shortcut>LondonJava</Shortcut>
    <Source>XDB</Source>
    </AUD>
    </dd.enumerate>
    <dd.enumerate>
    <CAD>
    <Currency>CAD</Currency>
    <Handle>GregB_CAD.today.</Handle>
    <Shortcut>LondonJava</Shortcut>
    <Source>XDB</Source>
    </CAD>
    </dd.enumerate>

    This is the new modified code but I still get blanks for the Text Values I am trying to retrieve....
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    public class CurveConfSave{
    public static void walkover(Node n){
    if( n.getNodeType() == Node.ELEMENT_NODE){
         System.out.println("Walking over: " + ((Element)n).getNodeName());
         for( Node c = n.getFirstChild();c != null;c=c.getNextSibling()){
              if("GBP".equals(c.getNodeName())){
                        NodeList childNodes = c.getChildNodes();
                        System.out.println("Child Nodes Length " + childNodes.getLength());
                        for (int i=0; i < childNodes.getLength();i++){
                        if(childNodes.item(i).getNodeType() == Node.ELEMENT_NODE){
                        System.out.println("Node value: " + "[" + childNodes.item(i).getNodeName() + "]");
                        if(childNodes.item(i).getNodeType() == Node.TEXT_NODE){
                        System.out.println("Node value: " + "[" + childNodes.item(i).getNodeValue() + "]");
                   System.exit(0);
              walkover(c);
    public static void main(String[] args) {
    try {
    DOMParser p = new DOMParser();
    p.parse("CurveConf1.xml");
    Document doc = p.getDocument();
    NodeList liveCurvesNodeList = doc.getElementsByTagName("LiveCurves");
    System.out.println("Num items: " + liveCurvesNodeList.getLength());
    // Get the first node from the node list
    Node liveCurvesNode = liveCurvesNodeList.item(0);
    System.out.println("Live Curves Node: " + liveCurvesNode.getNodeName());
    walkover(liveCurvesNode);
    } catch (Exception ex) {
    System.out.println(ex);

Maybe you are looking for

  • Power Mac G5 and Applications

    I'm currently in the market to buy a new Power Mac G5 Intel based. My question is, will my current programs run on the new mac? I currently use most often: Adobe Creative Suite CS, Studio 8, FlightCheck Professional, QuarkXpress. Are there any proble

  • How to build a subvi with a path

    Hi everybody I am using, in a main vi, a subvi with reentrant execution. Therefore I used a path to indicate the location of this subvi. It works very well. My problem is: When I build an application, and use it on another computer, the file.exe does

  • Blocking torrentfiles WRT54G v5.1

    Heya all. I've surfed on this forum for some time now, without actually finding a solution to my problem; torrent downloading is causing severe latency in both internet surfing and online gaming. Although i have tried setting QoS to give these applic

  • MySQL Server trouble

    I'm havin troubles configuring my MySQL Connection. I have a MySQL Database ready in my server. I know the test server is well configured. I think it must be a syntax error. I already tried: ftp.mydomain.com www.mydomain.com http://ftp.mydomain.com a

  • Template allocation enviornment 12 for production order not working

    Dear experts, i have more than 6 activity type in routing and the base will be machin hour qty means all my activity Fiance, HR,IT and quality ase will be machin hr qty defined in routing and rate will be different in kp26 for hr,IT<QC and finance. s