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

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

  • Read Selected Tree Node value.  Jdeveloper Jdeveloper 11.1.2.1.0 11.1.2.1.0

    Version: Jdeveloper 11.1.2.1.0
    how to get programmatically tree node value.
    i have tried but cann't read value from selected node.
    please help me.
    here is my application creation steps:
    1. New Application
    2. Fusion Web Application (ADF) Template
    3. Create View Object VOTreeMst
    Query:
         Select Department_Name,Department_Id
         From Departments
    4. Create View Object VOTreeChd
    Query:
         Select Last_Name,Employee_Id,Department_Id
         From Employees
    5. Create View Link VLTreeMstChd
         VOTreeMst.DepartmentId=VOTreeChd.DepartmentId
         And Add to Application Module
    6. Create page page1 in ViewController
         New-->Web Tier-->JSF/Facelets-->Page
         Selected Document Type JSP XML
    7. Drag VOTreeMst1 From Data Controls into page1
    and select Tree-->ADF Tree
    8. ADD java Code into selection Listener
    public void nodeSelect(SelectionEvent selectionEvent) {
    //original selection listener set by ADF
    String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
    //make sure the default selection listener functionality is preserved.
    //you don't need to do this for multi select trees as the ADF binding
    //only supports single current row selection
    /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elCtx = fctx.getELContext();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression me = null;
    me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
    new Class[] { SelectionEvent.class });
    me.invoke(elCtx, new Object[] { selectionEvent });
    /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    RichTree tree = (RichTree)selectionEvent.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    //get selected nodes
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    //for single select configurations, thi sonly is called once
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeBinding = null;
    CollectionModel collectionModel = (CollectionModel)tree.getValue();
    treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Row rw = nodeBinding.getRow();
    //print first row attribute. Note that in a tree you have to determine the node
    //type if you want to select node attributes by name and not index
    String rowType = rw.getStructureDef().getDefName();
    if(rowType.equalsIgnoreCase("VOTreeMst")){
    System.out.println("This row is a department: " + rw.getAttribute("DepartmentId"));
    else if(rowType.equalsIgnoreCase("VOTreeChd")){
    System.out.println("This row is an employee: " + rw.getAttribute("EmployeeId"));
    else{
    System.out.println("Huh ????");
    // ... do more usefuls stuff here
    9. when i click on first node it is working but i click on second node it is not working
    error message::
    <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:1589)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    I have also tried using following code but same problem
    public void onTreeSelect(SelectionEvent selectionEvent) {
    //original selection listener set by ADF
    String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
    //make sure the default selection listener functionality is preserved.
    //you don't need to do this for multi select trees as the ADF binding
    //only supports single current row selection
    /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elCtx = fctx.getELContext();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression me = null;
    me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
    new Class[] { SelectionEvent.class });
    me.invoke(elCtx, new Object[] { selectionEvent });
    /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    RichTree tree = (RichTree)selectionEvent.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    //get selected nodes
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    //for single select configurations, thi sonly is called once
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeBinding = null;
    treeBinding = (JUCtrlHierBinding)((CollectionModel)tree.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Row rw = nodeBinding.getRow();
    //print first row attribute. Note that in a tree you have to determine the node
    //type if you want to select node attributes by name and not index
    System.out.println("row: " + rw.getAttribute(0));
    But
    If i create .jspx page From
    Web Tier->Jsp->page Then it is working fine
    when i create .jspx page From
    Web Tier->JSF\Facelets->page Then it is not working
    i need to get value from "Web Tier->JSF\Facelets->page"
    is there any help please?

    You should try Franks generic selectionListener http://www.oracle.com/technetwork/developer-tools/adf/learnmore/25-generic-tree-selection-listener-169164.pdf. For help on hoe to get the selected tree node data check http://www.oracle.com/technetwork/developer-tools/adf/learnmore/26-get-selected-tree-node-data-169165.pdf
    Timo

  • Highlight an ADF tree node when it is clicked

    Hello every onei ,
    Does anybody has any idea how to highlight an ADF tree node when it is clicked ?
    Here is my scenario:-
    I have a popup which has a tree component on left and when we click on any node in the tree we have to display the corresponding page on right side.
    As the tree is common for all pages in the popup, i created an XHTML template with tree. All the treenode pages will use this template to display the tree.This template i am using to implement in rest of the pages.
    So when i click any link on this tree will load the corresponding JSP. But i am loosing focus. i mean selected node is not highlighting. Because we are loading the entire target page with template.
    Could any let me know how to highlight the tree node ?
    The Main problem is we are not using ADF controllers. We are using managed beans, these managed beans attached to the JSPX pages.
    Kindly guide me if any one knows solution.
    Thanks & Regards,
    Sai Sravan.P

    Hello Sai,
    I am afraid you have posted your question in the wrong forum. This forum is about Oracle On Track Communication, a next-generation social enterprise collaboration product.
    Please re-post your question in an ADF related forum and I am sure someone will be able to answer.
    Thank you,
    Ernst.

  • Programmatically selecting a Tree node

    Hi there,
    Given a TreePath object, I need to know how to programmatically select a tree node on a JTree.
    Here's the situation:
    I have a simple text editor project which has a JTree on its interface representing the local file system. The program has a SaveAs dialog box which also has a duplicate JTree as the one on the main interface (directories only). As the user selects the directory in which they wish to save the open file in the SaveAs dialog box, I need somehow to programmatically cause the JTree on the main interface to correspondingly select the same directory. How is this done?
    The whole point of this is so that I can then add a new leaf node to the tree at the specified directory location. I've tried simply setting the jTree1.setSelectionPath(...) method and even tried to call the valueChanged(...) method of the TreeSelectionListener object as you can see from the code snippet below, but none of these approaches have been successful.
    Please advise,
    Alan
    public void createLeafNode()
         jTree1.repaint();
         if(path == null)
            return;
         jTree1.setSelectionPath(path);
         //SelectionListener.valueChanged(new TreeSelectionEvent(jTree1, path, true, oldLeadPath, newLeadPath));
         //System.out.println("path is: " + path.toString());
         DefaultTreeNode parent = getTreeNode(path);
         //System.out.println("parent is " + parent.toString());
         //Create the child node
         IconData idata = new IconData(ICON_LEAF, new FileNode(new SpecialFile(ref.FileOpen)));
         DefaultTreeNode node = new DefaultTreeNode(idata);
         parent.add(node);
         //Tell the model that the tree structure has changed
         model.nodeStructureChanged(parent);
         path = path.pathByAddingChild(node);
         jTree1.scrollPathToVisible(path);
         //jTree1.repaint();    

    Yes, I've tried setSelectionPath(TreePath path) numerous times, but it does nothing to select the node on the tree! You can see from the code I submitted that it is there commented out.
    Ordinarily, when you click on a node on the tree it becomes the "active" node, evident because it becomes highlighted. But when I use setSelectionPath(TreePath path) method, giving it the path it needs, the node on the tree doesn't become the "active" node, therefore, not selected! Furthermore and subsequently, the rest of the code in the method createLeafNode() doesn't add a new node to the tree in the location specified by the TreePath object!
    If you have used setSelectionPath(TreePath path) before successfully I would be interested in seeing a small sample program demonstrating its use. It would have to prove to me that you can select a node in the tree without physically clicking on any node in the tree with the mouse cursor, and add a new child node to that selected node.
    I submit to you a small test program I put together that demonstrates the "typical setup". It requires the user to physically click on a node of the tree, then click on a button that adds a new node in the location of the selected node. If you can alter this program demonstrating that you can add a new node to the tree without my having to click on any node of the tree with my cursor, then I'll assign you the Duke Dollars and be forever humbled by your programming prowess.
    Thanks for keeping on top of this thread as I've tried everything I can think of to try and make my program work. If you need to ask any questions please ask away. Perhaps there is something about my program that I've not explained yet that you're not aware of that I should have included. At this point I can't see the forest for the trees.
    Alan
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JTree;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    public class AddNodeExample extends JFrame implements ActionListener
      JTree jTree1 = null;
      DefaultTreeModel model = null;
      DefaultMutableTreeNode rootNode = null;
      JScrollPane jScrollPane1 = null;
      JLabel status = new JLabel("Status:");
      TreePath path = null;
      JButton add = new JButton("Add new node");
      public static void main(String[] args)
        AddNodeExample example = new AddNodeExample();
        example.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      public AddNodeExample()
        super("Add Node To JTree Example");
        setSize(400, 300);
        jScrollPane1 = new JScrollPane();
        add.addActionListener(this);
        DefaultMutableTreeNode[] boys = new DefaultMutableTreeNode[6];
        boys[0] = new DefaultMutableTreeNode("Harry");
        boys[1] = new DefaultMutableTreeNode("Tom");
        boys[2] = new DefaultMutableTreeNode("Jake");
        boys[3] = new DefaultMutableTreeNode("Brian");
        boys[4] = new DefaultMutableTreeNode("Alan");
        boys[5] = new DefaultMutableTreeNode("Guy");
        DefaultMutableTreeNode[] girls = new DefaultMutableTreeNode[6];
        girls[0] = new DefaultMutableTreeNode("Debbie");
        girls[1] = new DefaultMutableTreeNode("Jane");
        girls[2] = new DefaultMutableTreeNode("Sally");
        girls[3] = new DefaultMutableTreeNode("Jessica");
        girls[4] = new DefaultMutableTreeNode("MoonUnit");
        girls[5] = new DefaultMutableTreeNode("Sara");
        rootNode = new DefaultMutableTreeNode("Students");
        DefaultMutableTreeNode Boys = new DefaultMutableTreeNode("Boys");
        DefaultMutableTreeNode Girls = new DefaultMutableTreeNode("Girls");
        //Fill up the node for boys
        for(int i = 0; i < boys.length; i++)
          Boys.add(boys);
    //Fill up the node for girls
    for(int i = 0; i < girls.length; i++)
    Girls.add(girls[i]);
    //add Boys and Girls to rootNode
    rootNode.add(Boys);
    rootNode.add(Girls);
    model = new DefaultTreeModel(rootNode);
    jTree1 = new JTree(model);
    jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    jTree1.putClientProperty("JTree.lineStyle", "Angled");
    jTree1.addTreeSelectionListener(new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent event)
         path = event.getPath();
    DefaultMutableTreeNode node = getTreeNode(path);
    status.setText("Selected: " + (String)node.getUserObject());     
    jScrollPane1.getViewport().add(jTree1, null);
    getContentPane().add(jScrollPane1, BorderLayout.CENTER);
    getContentPane().add(add, BorderLayout.NORTH);
    getContentPane().add(status, BorderLayout.SOUTH);
    setVisible(true);
    public DefaultMutableTreeNode getTreeNode(TreePath path)
    return (DefaultMutableTreeNode)(path.getLastPathComponent());
    public void actionPerformed(ActionEvent e)
    jTree1.repaint();
    if (path == null || path.getPathCount() < 1)
         return;
    DefaultMutableTreeNode treeNode = getTreeNode(path);
    DefaultMutableTreeNode newNode = new DefaultMutableTreeNode("My New Node");
    treeNode.add(newNode);
    model.nodeStructureChanged(treeNode);
    path = path.pathByAddingChild(newNode);
    jTree1.scrollPathToVisible(path);                    

  • Formatting multiple values in ADF tree node

    JDeveloper 11.1.2.2.0 -- WinXP
    I have an ADF tree component that is bound to a table with two values per node level.
    The results look like:
    Fruit 1234
        -- VineGrown 5678
           -- Grapes 4567
               -- Red 1234
               -- Green 56
    Veggie 4567
       -- Root 45
          -- Carrot 34
          -- Potato 987What I want to be able to do is format the outputText so that it will end up looking more like "Fruit :: Total 1234"
    The issue is that the EL of #{node} displays both the node level value and the number as one item. This is in the facet nodeStamp.
    If I try and get more specific with the EL, I can separate out the Uses number by doing #{node.Uses} but I can't get the node name to still be dynamic for each level.
    My binding options for node are shown as:
    node.Type
    node.GrownLocation
    node.Group
    node.Value
    node.Uses
    Of course setting the first #{node} to any of these more specific values doesn't display at all for the node levels that don't correspond to just that one level.
    Ideally the EL line would look something like:
    <af:outputText value="#{node.name} ::  Total: #{node.Uses}" id="ot3"/>where node.name could be any one of the levels: Type, GrownLocation, Group, etc.
    Is this something that pathStamp would be used for? I couldn't really figure out how pathStamp worked from the docs.
    Thanks for any help. Hopefully this makes some sense.
    --jb                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You can try something like this:
    <af:column id="c1">
    <af:outputText value="#{node.name} ::  Total: #{node.Uses}" id="ot3" rendered="#{node.name != null}"/>
    <af:outputText value="#{node.Type} ::  Total: #{node.Uses}" id="ot3" rendered="#{node.Type!= null}"/>
    <af:outputText value="#{node.GrownLocation} ::  Total: #{node.Uses}" id="ot3" rendered="#{node.GrownLocation!= null}"/>
    <af:outputText value="#{node.Group} ::  Total: #{node.Uses}" id="ot3" rendered="#{node.Group!= null}"/>
    </af:column>So the rendered property will make sure that the correct node is displayed according to each level.
    Hope this helps.

  • How to get all tree node parents upon select

    I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node.
    So if I have this XML:
    <products>
        <item>
            <sku>1001</sku>
            <quantity value="100" />
        </item>
        <item>
            <sku>2001</sku>
            <quantity value="250" />
        </item>
        <item>
            <sku>3001</sku>
            <quantity value="300" />
        </item>
    </products>  
    If user clicks on the 1001 sku, I want to get something like this:
    <products><item><sku>
    Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value="100", I want to get this:
    <products><item><sku><quantity>
    I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields.
    The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say <sku> elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
    Thanks very much!

    var path:Array=[]
    var parent:XML = xxxx.selectedItem.parent()
    while(parent){
    path.push(parent.localName())
    parent = parent.parent()
    Or, i didn't get your question and xxxx.selectedItem is "detached" XML snippet ?

  • Error in Getting Selected Tree node From POPUPMENU

    Environment: Forms 9i, 9i AS
    The Folowing code is written with in POPUP MENU to get the selected tree node. It always returns 0. The samE code works fine with in any other TRIGGER. Is it Forms BUG?
    v_sel_tree := ftree.GET_TREE_SELECTION(v_item,1);

    Whether or not it is a bug you need a workaround.
    How about getting the when-tree-node-selected to set a package variable and look at its value in the pop-up menu code.

  • Assigning Selected Tree Node Value To An Item

    Hi guys,
    I want to assign selected tree node's value to a page item. This item can be a textbox or a label (display only). How can i do that? I tried to use "Selected Node Page Item" property which is available on Tree Attributes. But I couldn't assign the value without refreshing whole page.
    Do you have any idea?
    Thanks.

    Hi ,
    Thank you that was exactly what I was looking for. I couldn't find how to pass database column to javascript as an input parameter. So thanks for your help. I made a couple of correction :
    1) I put additional ' characters to ('''||"NAME"||''') this part because my field is varchar.
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    NAME as title,
    null as icon,
    "ID" as value,
    null as tooltip,
    'javascript:setFObjName('''||"NAME"||''')' As link
    from "#OWNER#"."TABLE_NAME"
    start with "PID" is null
    connect by prior "ID" = "PID"
    2) In script I have added ' character before and after page item.
    function setFObjName(pobjName){
    $s('P1_OBJ_NAME', pobjName);
    So it works. Thanks tfor your help.

  • How to add custom ADF Tree Node icon

    Hi All,
    i am using below code in style sheet to set the tree node icon,
    af|tree::node-icon:nodetype-collapsed
    but i don't have any idea how to add getnodetype() method in the node class, (I am using Jdeveloper 11.1.1.2.0). please suggest me the steps to achive it.
    Thanks,
    Mahesh

    i did as you suggested, but i am not getting any image, below is my source
    <nodeDefinition DefName="com.mahesh.SSCExplorer.model.ROview.OrdrHdrVO"
    Name="OrdrHdr20"
    TargetIterator="${bindings.OrdrHdr2Iterator}"
    ClosedIcon="/Nuvola_filesystems_folder.png"
    OpenIcon="/Nuvola_filesystems_folder.png"
    Icon="/Nuvola_filesystems_folder.png">
    please suggest is there any other settings i need to do.
    Thanks,
    Mahesh

  • [SOLVED] Trying to get ADF Tree to show Distinct results only

    Hello,
    I am trying to make an ADF Tree in JDeveloper 10.1.3.3.0.4157.
    I have it show two levels, each level is from one column of my table.
    For example, if I had columns
    Sec_1
    1
    1
    2
    2
    and
    Sec_2
    4
    5
    6
    7
    I want it to show a tree that has
    1
    ---4
    ---5
    2
    ---6
    ---7
    But instead it shows as
    1
    ---4
    ---5
    1
    ---4
    ---5
    2
    ---6
    ---7
    2
    ---6
    ---7
    Is there any way I can fix this? I've tried changing my view objects to specify SELECT DISTINCT but that doesn't work because I need to include a primary key in each view object and the primary keys are of course already distinct.
    Sorry for the poor diagrams but I couldn't think of a better way to explain it.
    Thanks
    Message was edited by:
    TheNelson

    I guess I sould clarify a bit:
    I have a dropdown menu elsewhere on the form that chooses something from a separate column (main_column). When that is selected, the tree appears and shows the columns I mentioned. Sorry, I didn't think this other one might be relevant.
    So I have
    main_column
    a
    a
    a
    a
    b
    b
    b
    b
    Sec_1
    1
    1
    2
    2
    3
    3
    4
    4
    Sec_2
    3
    4
    5
    6
    3
    4
    5
    6
    The Master VO is for the main_view, and it then had a detail Sec_1 and in that is a detail Sec_2.
    I've made view links between all of them.
    The problem happens like I said in my above post is that the main_column (and a few others) are primary keys and need to be included. Especially main_column needs to be included in my view object because it is used in the view link with the dropdown box.
    Does that make sense? Sorry for not describing this well earlier, I was trying to simplify it.
    Basically the problem is:
    A view object needs to have a primary key
    A primary key has every value distinct
    using SELECT DISTINCT therefore selects every row.
    Message was edited by:
    TheNelson

  • How to programmatically click a tree node(make it selected)?

    in my program, i want to make a tree node "clicked" by codes, so that the valueChanged(TreeSelectionEvent tse e) method of the TreeSelectionListener can be invoked.
    thanks a lot!!

        private Robot robot;
        private void triggerMouseClick(TreePath treePath) {
            if (robot == null) {
                try {
                    robot = new Robot();
                    robot.setAutoDelay(60);
                catch (AWTException e) {
                    e.printStackTrace();
            Rectangle rect = this.getPathBounds(treePath);
            Point point = new Point(rect.x+1, rect.y+1);
            SwingUtilities.convertPointToScreen(point, this);
            robot.mouseMove(point.x, point.y);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
        }

  • How can I get the adf-tree-node's attributes?

    I want get the attributes in the method of "selectionListener"?
    How can I do?
    I only know :
    RichTree treeId;
    RowKeySet keySet = treeId.getSelectedRowKeys();
    Thanks!

    You don't want to maintain a reference to the last selected node, but to the last selected path. Nodes within a tree are addressed using a TreePath, with contains references to each node from the root, down to a specific node. Look at the JavaDocs of javax.swing.tree.TreePath for more info.
    Also, JTree has getter/setter methods for the selectionPath.

  • Skin Text of ADF Tree Node and Leaf separately

    Hi,
    Is it possible to skin a tree (ADF 11g), so that the text of a node is white on black, and text of a leaf is black on white?
    I know I can change the icons for a node and a leaf separately , but can't find how to change the styles of the text seperately.
    Groeten,
    HJH

    Hi,
    1. Thanks.. i did understand...I am creating a tree with region-countries-location... so when i drag and drop the region view as a tree ... I get a default code like this
    <af:tree value="#{bindings.RegionsView1.treeModel}" var="node"
    selectionListener="#{bindings.RegionsView1.treeModel.makeCurrent}"
    rowSelection="single" id="t1">
    <f:facet name="nodeStamp">
    <af:outputText value="#{node}" id="ot1" />
    </f:facet>
    </af:tree>
    In this i have used output text ... so how do i use the styleclass.... I am a new bie so can u also tel me how to use implement the same and alsohow to create a styleclass..........
    2. I have to display a seperate icons for parent node and leaf nodes.. can u tel me how to achieve this also...
    Can u provide me ur sample and also docs so that it would be helpful...
    Id: [email protected]
    Thx.. waiting for your reply

Maybe you are looking for

  • Basics of SD,Finance,SCM,Operations required in SAP BI implementation

    Hi, Can some one help me in getting some basic material to understand the following modules: SD,Finance,SCM,Operations Many Thanks, Sravani

  • Jsp maintenance problem

    Greetings... There are some vendors(appx. 10, which is expected to increase in future) doing branding of their websites for our application. As part of this integration we need to provide them with header & footer html assets (html, javascript, css a

  • Could you please answer to this?

    [object array|http://i218.photobucket.com/albums/cc298/curseofgoldendragon/code-1.png] Could you please answer to this?

  • Gzip to compress zip files

    hi everyone..i am making a backup utility. it will compress, encrypt and split the files and send it to an ftp server. i have everything worked out except for one bug...when i compress already compressed data, it gets corrupted...like installers, or

  • Error Message on MyBT

    Hi, I'm a new BT user - we're having our BT Infinity activated tomorrow - but ever since I registered with MyBT (a week ago!), I have been unable to view anything or do anything on my account. When I log in, I am taken to my account homepage, but the