To get  node value in a tree

I have a tree with 3 level and it is working fine.. In view mode I need the First child value of the 3rd level with out clicking / Selecting from teh Tree node..
for eg;
A -- ist level
Ap -- 2nd level
Apple -- 3rd level
So What I need is that I should get a message 'Apple' While landing teh Form itself without clicking on teh Tree
Thanks in Advance...

To my knowledge it is not possible to get the value of a node which is not selected.
What you have to do is to build up a memory structure similar to your tree, then you can access any node at any time.
Peter

Similar Messages

  • How to get a Tree Node Value when a Tree is Expanded

    My reqiurement is when i Expand a Tree i need the Expanded tree Node Value. For Example Consider Parent as a Root Node of a Tree, and Consider its two Children Child1 and Child2.
    When + Parent Expanded
    I will Get the Output as --Parent
    - Child1
    - Child2
    so As when i expand the Tree i must Get the String Value Parent.

    duplicate
    How to get a Tree Node Value when a Tree is Expanded

  • How to get the selected node value of a tree which is build on java code

    Hi Experts,
    How can i get the selected node value if I build the tree programatically.
    I am using the following code in selectionListener but it is throwing error.
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    CollectionModel _tableModel =
    (CollectionModel)treeTable.getValue();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    String selectedQaCode ="";
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    String nodeStuctureDefname =
    nodeBinding.getHierTypeBinding().getStructureDefName();
    selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
    where I am using following link to create a tree with java code.
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
    Please help me in resolving this issue.
    Regards
    Gayaz

    Hi,
    you should also move
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    out of the while loop as this is not necessary to be repeated for each key in the set
    Frank

  • Getting Node Value of an XML document in JAVA.

    Hi,
    In my application, I have got the exact node that I want by parsing the document, but the node value returned is null as the node is an element and the Java Documentation does specify that it will return null. I would like to know if there in any alternative way by which I can parse the document and get the specified value of the node or element. Kindly Help.

    Well, there are not many mind readers on this forum.
    You do not tell us how you are parsing the document, and so it is difficult determining why the node value is returned as a null.
    There are two main styles of processing XML -- DOM and SAX. Dom (and its variants JDom and I think Dom4J) build a tree structure that is memory-resident. There are ways to walk up and down the tree, and locate arbitrary nodes in the tree.
    The other style is SAX, which is much less intensive from a memroy perspective, but puts more work on you to keep what you want as the data goes flying by.
    So, how are you "parsing the document" and what method is returning a null? That may give someone enough information to guess at your problem.
    Dave Patterson

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • Getting Node Value of an XML element in JAVA.

    Hi,
    In my application, I have got the exact node that I want by parsing the document, but the node value returned is null as the node is an element and the Java Documentation does specify that it will return null. I would like to know if there in any alternative way by which I can parse the document and get the specified value of the node or element. Kindly help.

    Hi,
    i am using the dom parser. My code is as follows.
    Document xmlDocument, outputDoc;
                   DocumentBuilderFactory dbfObject = DocumentBuilderFactory.newInstance();
                   DocumentBuilder dbObject = dbfObject.newDocumentBuilder();
                   xmlDocument =  dbObject.parse("IPD_Response.xml");
                   Element dd = xmlDocument.getDocumentElement();
                   NodeList ItemAttributes = dd.getElementsByTagName("Element Name");
                   System.out.println("element" + ItemAttributes.item(0));
                   Node ss = ItemAttributes.item(0);
                   NodeList bb = ss.getChildNodes();
                   Node cc = ss.getFirstChild();
                   System.out.println("element sibling1 "+bb.item(0));
                   System.out.println("element sibling 2"+bb.item(1));
                   System.out.println("element sibling 3"+bb.item(2));
                   System.out.println("element child "+cc);
                   Node aa = bb.item(0);
                   NodeList qqq = aa.getChildNodes();
                   System.out.println("element sibling1---1 "+qqq.item(0));
                   System.out.println("element sibling1---1 "+qqq.item(1));
                   Node fff = qqq.item(0);
                   Node aaa = qqq.item(1);
                   String value1 = fff.getNodeValue();
                   String value2 = aaa.getNodeValue();
                   System.out.println("1st value "+value1+" 2nd value "+value2);What my code does is gets all the elements within a particular tag. After that i look for the child nodes, which i have done successfully. But when i get the value using getNodeValue(); method it will be null as per the Java Docs. Is there any other way by which i can get the node value. Kindly help.
    How do you parse the XML Document ?
    Are you using a DOM Document ?
    Which parser do you use ?
    How do you access the Element ?
    Post the releveant part of the code and using the
    [code ]  tags as described in[url=http://forum.java.sun.com/help.jspa?sec=formattin
    g]Formatting tips
    andi

  • I can not get link-value  from af:tree.

    Hello.
    I use jdeveloper 10g.
    I can not get link-value from tree.
    I use following code:
    <f:facet name="nodeStamp">
    <h:panelGroup binding="#{backing_dialogDic_dic_ETS.panelGroup1}"
    id="panelGroup1">
    <h:outputText value="#{item.vidNum} #{item.vidName}"
    binding="#{backing_dialogDic_dic_ETS.outputText1}"
    id="outputText1"/>
    <af:commandLink
    binding="#{backing_dialogDic_dic_ETS.commandLink2}"
    id="commandLink2"
    action="#{backing_dialogDic_dic_ETS.returnObject}">
    <af:setActionListener from="#{item.idVid}"
    to="#{processScope.ETSId}"/>
    <af:objectImage source="/images/icons/10.gif"
    shortDesc="Выбрать"
    binding="#{backing_dialogDic_dic_ETS.objectImage2}"
    id="objectImage2"/>
    </af:commandLink>
    </h:panelGroup>
    </f:facet>
    </af:tree>
    //in java bean:
    public String return_Object() {
    Object ob = JSFUtils.getManagedBeanValue("processScope.ETSId");
    System.out.println(o);
    return null;
    In console I see null.
    How I get this value???
    I can get this value if i use treeTable instead of tree.
    Thx, Dema.

    Hi,
    not that I think it matters, but the processScope is not a managed bean but a memory scope. So if
    JSFUtils.getManagedBeanValue("processScope.ETSId");
    assumes a managed bean then this may be incorrect as most likely there exist no managed bean with this name. You should be able to access the process scope from AdfFacesContext.getProcessScope(), which then returns a Map, which you call get("ETSId") on
    Frank

  • Get node value from xml?

    I want to read a XML file so am trying like this:
                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                m_doc = docBuilder.parse("formular/faktura2.xml");
                Element root = m_doc.getDocumentElement();
                root.normalize();
                NodeList list = root.getChildNodes();
                for (int k=0; k<list.getLength(); k++)
                    Node nd = list.item(k);
                    System.out.println("node "+nd);
                }The output of this code is:
    <datatabel>
    <navn>Tabel</navn>
    <aktiv>1</aktiv>
    <tabel>BILAGSPOSTER</tabel>
    <kolonne>
    <navn>VareNr</navn>
    <hoved>VareNr</hoved>
    <bredde>50</bredde>
    <aktiv>1</aktiv>
    </kolonne>
    <id>1</id>
    <fontNavn>Verdana</fontNavn>
    <fontStr>12</fontStr>
    <fontFed>0</fontFed>
    <fontKur>0</fontKur>
    <fontUnd>0</fontUnd>
    <posX>83.0</posX>
    <posY>463.0</posY>
    <bredde>440.0</bredde>
    <hoejde>150.0</hoejde>
    </datatabel>
    But how do I get the values inside nodes? I tried with getNodeValue() but then the only output I get is null. Can someone plz help me with this?

    Try this:
       /** Lists a node and its childs */
       public static void listNodes(Node root) {
          System.out.println("Node "+root);
          if (!root.hasChildNodes()) return;
          NodeList nodes = root.getChildNodes();
          for (int k=0; k<nodes.getLength(); k++) {
             listNodes(nodes.item(k));
       }Hope this helped,
    Regards.

  • BPEL get node value

    Hi All,
    I am new to BPEL and had been struggling to get the value of a particular node from a list of nodes.
    My XML looks like:
    <ns2:attributes>
    <ns2:Name>Known AS</ns2:Name>
    <ns2:Value>Known as</ns2:Value>
    </ns2:attributes>
    <ns2:attributes>
    <ns2:Name>Junk1</ns2:Name>
    <ns2:Value>junlk1</ns2:Value>
    </ns2:attributes>
    <ns2:attributes>
    <ns2:Name>Business Unit</ns2:Name>
    <ns2:Value>BUUnit</ns2:Value>
    </ns2:attributes>
    <ns2:attributes>
    <ns2:Name>Cost Center</ns2:Name>
    <ns2:Value>100000</ns2:Value>
    </ns2:attributes>Now my requirement is that I want to get the value of the node named 'Cost Center' only. One way which I have it working as of now is to get a count of the total number of nodes and then in a while loop iterate over all the nodes and use a switch condition to check for the node name = 'Cost Center' and then get the value.
    I was wondering if I can do something like below or any other way by which I can get the position based on node name (something like search functionality)
    bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:attributes[@name='Cost Center']/ns4:Value') Thanks,
    Bikash

    Hi Bikash,
    This should do...
    bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:attributes[ns4:Name = &quot;Cost Center&quot;]/ns4:Value')The quotes around "Cost Center" may need to be escaped...
    Cheers,
    Vlad

  • How to get node value of XML file from XMLTYPE field of databases

    Hi,
    I want to select node value of XML from XMLTYPE field of oracle db into java code.
    Feel free to answer me if you have any idea about it.
    Thanks

    For XMLType refer
    http://www.oracle.com/oramag/oracle/01-nov/o61xml.html
    http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96620/xdb04cre.htm

  • Get Node Value in XSLT

    Hi all.
    Maybe a simple question but, I haven't done yet.
    In BPEL, when I need to get a node, I use getVariableData XPath function, for example:
    count(bpws:getVariableData('MtlSystemItemsBESB_OutputVariable','MtlSystemItemsBCollection','/ns7:MtlSystemItemsBCollection/ns7:MtlSystemItemsB')) to get the number of lines returned from the service call.
    Now, when I use XSLT transformation in ESB, I don't have a variable to extract the value from. So, how do I use XPath expressions that involve node-set return values?
    I tried something like count('/ns7:MtlSystemItemsBCollection/ns7:MtlSystemItemsB') but it does not seem to work.
    Thanks
    Denis

    Hi Denis,
    count('/ns7:MtlSystemItemsBCollection/ns7:MtlSystemItemsB') should work as expected. Have you double checked your XPath (namespace, elementnames, etc.)?

  • Get Node value inside Transform activity using any function

    <xsl:when test="\ns0:data = *+Value of Xml node(NODE)+*">
    </xsl:when>
    At value of XML node i want to put the value of one xml node. is there any function in transform to get the content of node.
    Thanks
    vivek
    Edited by: 809104 on Nov 14, 2010 9:29 PM

    I got the solution
    we can use variable inside transform and assign xpath value to that variable then we can use that variable inside test condtition
    <xsl:variable name="name" select="xpath"/>
    <xsl:when test="\ns0:data = $name">
    </xsl:when>

  • How to edit the node value of a tree in webdynpro java

    Hi ALL
    I have Tree UI element where i got displayed all the nodes by calling the BAPI
    Now my requirement is when i put the cursor at any node in the Tree struture then on click of insert button i need to insert the new node with the text  , the user has to be option to give new text for the new node dynamically  , so while adding the new node in a tree the tree has to choose the text for new node , like how to edit the node of a tree to add new text.
    If any one can send the sample code on the same then it would be great help to me.
    Similar requirement like in table UI Like however we are adding the new row in a table when we click on the insert button then cursor will go to that new row in a table where user can enter his details in the table.. now i am looking for the same requirement in a Tree UI element.
    is it possible the same requirement in tree UI element in webdynpro for Java??
    Thanks
    kallki reddy

    Hi kallki reddy
    In general I think this is not possible in the form you'd like. It seems the Tree control is read-only thing always. It cannot provide editing capabilities.
    Table is different thing. You can select within many different cell editors including Input Fields.
    I guess that you scenario could be implemented not with Tree control, but with Table with Master Column. The master column allows to bring up a hierarchy into a plain table. So it's just a tree inside a table.
    Here you can find further details: [TreeByNestingTableColumn API|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/92/12a74046033913e10000000a155106/content.htm]
    BR, Siarhei

  • Programmatically getting ADF Tree node value(Version 11.1.2.0.0)

    Hi Forum,
    My Jdeveloper version 11.1.2.0.0
    and i am using Fusion Web Application (ADF) Template.
    In my .jspx page i have added ADF Tree.
    Now i want to get node value from backing bean.
    My java code is
    public void selectevent(SelectionEvent evt) {
    RichTree tree = (RichTree)evt.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    RowKeySet rowKeySet = evt.getAddedSet();
    Object key = rowKeySet.iterator().next();
    model.setRowKey(key);
    JUCtrlValueBinding nodeBinding = (JUCtrlValueBinding)model.getRowData();
    if(model.getDepth()==1){
    int empid = (Integer)nodeBinding.getAttribute("EmployeeId");
    when i click on second node the following error occured.
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
         at tree.view.clsTreeTest.selectevent(clsTreeTest.java:23)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 48 more
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
         at tree.view.clsTreeTest.selectevent(clsTreeTest.java:23)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 48 more
    Please any solution to get node value programmatically.
    Thanks

    Thanks
    After applying new code when i click on first node it is working fine but click on second node it produced error like below
    <FacesCtrlHierBinding$FacesModel> <makeCurrent> ADFv: No row found for rowKey: [oracle.jbo.Key[], oracle.jbo.Key[]].
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
         at tree.view.clsTreeTest.selectevent(clsTreeTest.java:69)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 48 more
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
         at tree.view.clsTreeTest.selectevent(clsTreeTest.java:69)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 48 more

  • Accessing XML node value

    Hi,
    Is there any method to get node value other than getTextContent() in org.w3c.dom.Node?
    Here is my XML
    <data>value<data>
    Hoe can i get "value" using java?
    Thanks
    Shagil

    The text "value" is a child node of element node "data". So, by following the tree structure of DOM, you'll get this text by asking for the node value of the (first) child node of the element.
    Node data = ...;
    if (data.hasChildNodes()) {
      String text = data.getFirstChild().getNodeValue();
      // use text
    }

Maybe you are looking for