Get selected node of an adf tree in backing class

hi,
i am deploying an adf web application, i use jdeveloper 11g and a weblogic webserver.
i have a bean family this bean contains a list of families and a parrentfamily object, so it is a rekursive relationship.
i use the adf tree component to show all the families starting with the root family. works fine. only had to create a data controle of the bean and with dragndrop i create the adf tree.
now i want to create a subfamily of any family shown in the tree, so i need the selected tree node in my backing bean (in a methode which is the action of my buttono) of the adf page.
but iam unable to get the data.
so my question i searched many times for:
What is the best and easiest way to get the selection of an adf tree in the backing bean of the page?

Hi,
here's how you get the object itself, assuming your model is POJO based. Assuming "tree" is a variable pointing to a RichTree instance
CollectionModel treeModel = (CollectionModel) tree.getValue();
JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) treeModel.getWrappedData();
RowKeySet rks = tree.getSelectedRowKeys();
if(!rks.isEmpty()){
  List firstSet = (List)rks.iterator().next();
JUCtrlHierNodeBinding node = treeBinding.findNodeByKeyPath(firstSet);
  DCDataRow rw = (DCDataRow) node.getRow();
  //get the object
Object entity = rw.getDataProvider();       
}                         Frank

Similar Messages

  • 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

  • JTree get selected node/object values

    I wan to get all the selected nodes/objects values that I added to the JTree. How can I do this?
    Thanks.

    TreePath[] paths = tree.getSelectedPath();
    for(int i = 0; i < paths.length; i++){
    TreeNode node = (TreeNode)paths.getLastPathComponent();
    Object mySelectedObject = node.getUserObject();
    }Some minor Errors
    We have to use array paths[i] instead of paths
    The correct code as used by me is
            javax.swing.tree.TreePath[] paths = jTree1.getSelectionModel().getSelectionPaths();
            for(int i = 0; i < paths.length; i++){
                javax.swing.tree.TreeNode node = (javax.swing.tree.TreeNode)paths.getLastPathComponent();
    System.out.println(((javax.swing.tree.DefaultMutableTreeNode)node).getUserObject());
    CSJakharia

  • HOw to get selection node h2 tag on http agility pack

    <div id="content">
    <div class="sense-block" id="1-1>
    <h2>
    <span class="hw">appear</span>
    <span class="posgram">
    <span class="pos" title="A word that describes an action, condition or experience.">verb</span>
    </span>
    <span class="guideword" title="Guide word: helps you find the right meaning when a word has more than one meaning">
    (BE PRESENT)
    </span>
    </h2>
    <div class="sense-body">
    <span class="def-block">
    <span class"def-body">
    <span class"examp"></span>
    <span class"examp"></span>
    </span>
    </span>
    <span class="def-block>
    <span class="def-body">
    <span class"examp"></span>
    <span class"examp"></span>
    </span>
    </span>
    </div>
    </div>
    <div class="sense-block" id="1-2>
    <h2></h2>
    <div class="sense-body">
    <span class="def-block"></span>
    <span class="def-block></span>
    </div>
    </div>
    </div>
    var newsListNodehtml = htmlDoc.GetElementbyId("1-1");
    if(newsListNodehtml!=null)
    var senseblock = newsListNodehtml.Descendants("span").Where(x => x.GetAttributeValue("class", "") == "def-block");
    if(senseblock!=null)
    foreach(var node in senseblock)
    Dictionaries = new Models.EnglishDictionary();
    var title = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "def");
    var examp = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "def-body");
    //Dictionaries.Symbol = "/Photos/glasses-50.png";
    if (title != null)
    Dictionaries.Description = title.InnerText.Trim();
    if (examp != null)
    Dictionaries.Examp = examp.InnerText.Trim();
    var hw = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "hw");
    var prsgram = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "posgram");
    var word = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "guideword");
    if (hw != null)
    Dictionaries.Word = hw.InnerText.Trim();
    if (word != null)
    Dictionaries.GuideWord = word.InnerText.Trim();
    if (prsgram != null)
    Dictionaries.Grammar = prsgram.InnerText.Trim();
    //Dictionaries.Phrase=pharsel.InnerText;
    arrays.Add(Dictionaries);
    <div id="x_x_1-1>">
    var senseblock = newsListNodehtml.Descendants("span").Where(x => x.GetAttributeValue("class", "") == "def-block");
    So, senseblock will not be have <h2> tag. Of couse that results is null to (foreach will be play two time and getting def-block two times"
     But If I changed It(senseblock ) to 
              var newsListNodehtml = htmlDoc.GetElementbyId("content"); // content is contain all tag
                if(newsListNodehtml!=null)
                    var senseblock = newsListNodehtml.Descendants("span").Where(x => x.GetAttributeValue("class", "") == "sense-block");
    Then  foreach that just play the def-block once time.
    Note: I'm still want get all of h2 tag and def-block(two time because of having 2 div def-block tag)in id 1-1. How???

    Thanks, I figured out this my ways to solve it.
    I want ask you: How to return Lis<> (async). 
    Ex:
    public async void loaddata(string id)
    var httpClient = new HttpClient();
    var srtHtml = await httpClient.GetStringAsync("http://dictionary.cambridge.org/dictionary/british/appeal");
    var htmlDoc = new HtmlDocument();
    htmlDoc.LoadHtml(srtHtml);
    List<Models.EnglishDictionary> arrays = new List<Models.EnglishDictionary>();
    var newsListNodehtml = htmlDoc.GetElementbyId("entryContent");
    if (newsListNodehtml != null)
    var senseblock = newsListNodehtml.Descendants("div").Where(x => x.GetAttributeValue("id", "") == id);
    if (senseblock != null)
    foreach (var node in senseblock)
    Dictionaries = new Models.EnglishDictionary();
    var def = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "def");
    var examp = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "def-body");
    //Dictionaries.Symbol = "/Photos/glasses-50.png";
    if (def != null)
    Dictionaries.Description = def.InnerText.Trim();
    if (examp != null)
    Dictionaries.Examp = examp.InnerText.Trim();
    var hw = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "hw");
    var prsgram = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "posgram");
    var word = node.Descendants("span").FirstOrDefault(x => x.GetAttributeValue("class", "") == "guideword");
    if (hw != null)
    Dictionaries.Word = hw.InnerText.Trim();
    if (word != null)
    Dictionaries.GuideWord = word.InnerText.Trim();
    if (prsgram != null)
    Dictionaries.Grammar = prsgram.InnerText.Trim();
    arrays.Add(Dictionaries);
    else
    // error = "No data";
    Listview.itemsource=arrays;
    I want on ousite it will called back into "itemsource" of lisview.
    Ex:Listview.itemsource=loaddata("1-1");
    How???

  • ADF Tree 10.1.3.1, not highlighting the selected node.

    Hi,
    I'm having a problem highlighting the selected node in the ADF CoreTree.
    I use the treehandler and model as described in the link: http://technology.amis.nl/blog/2116/much-faster-adf-faces-tree-using-a-pojo-as-cache-based-on-read-only-view-object-showing-proper-leaf-nodes-again
    I use this objects because my tree was showing leaf node with the image to collapse.
    The tree now looks great, the only problem is that when i click on a node the focusRowKey is set accordingly(debugging the getter and setter) but is not show as the selected node.
    The tree jspx code looks the follow:
                   <!--TREE-->
                                     <af:tree value="#{ActosTreeHandler.treemodel}" var="node"
                                               focusRowKey="#{ActosTreeHandler.focusRowKey}"
                                               id="treeActos"
                                               varStatus="nodeStatus" binding="#{ActosTreeHandler.jsfTree}">
                                        <f:facet name="nodeStamp">
                                          <af:commandLink text="#{node.description}" partialTriggers="treeActos"
                                                          action="#{backing_documentos_detalhesDocumento.treeAction}">
                                            <!--disabled="#{node.nodeType != 'ACTO'}"-->
                                            <af:setActionListener from="#{ActosTreeHandler.jsfTree.rowKey}"
                                                                  to="#{ActosTreeHandler.focusRowKey}"/>
                                            <af:setActionListener from="#{node}"
                                                                  to="#{ActosTreeHandler.selectedNode}"/>
                                            <af:resetActionListener/>
                                          </af:commandLink>
                                        </f:facet>
                                      </af:tree>Does anyone know how this can be solved?
    Best Regards.

    Hi,
    is this the same as
    Re: Facing a problem in programmatically setting focus on a node in <af:tre
    Frank

  • Get current Tree Select Node

    Hi,ALL
    I want to return JTree selection.
    As you know If use JTree object, we can use
    getSelectionPaths(), and use Treepah object method
    getLastPathComponent to get selected node.
    What I want to do is.
    My JTree Object model is DefaultMutableTreeNode
    i want to use DefaultMutableTreeNode to access selected Node.
    Can I do like this?
    If I can, how to do it?
    Thanks in advanced

    Hi,
    if you following that pdf ,
    i think your not implemented the below code in DomodifyView method
    if (firstTime) {
          IWDTreeNodeType treeNode = (IWDTreeNodeType) view.getElement("TheNode");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "selectedElement".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onAction event. Parameter "selectedElement" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onAction. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnAction().addSourceMapping("path", "selectedElement");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "element".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onLoadChildren event. Parameter "element" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onLoadChildren. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    please cross check once.
    Thanks,
    Ramesh

  • How to implement a go to next node button for an ADF Tree backed by ADF Bin

    Dear all,
    I have been trying for quite some time now, and I do not get it. For my ADF Tree component, I want to implement a series of little iconic buttons that my users can press to Expand and Collapse the current node - those I have got to work, sort of - and Move to the Next or Previous node. My definition of Next Node is: the next node you can see on the screen; this can either be a child, a sibling or an ancestor's sibling.
    + A
    - B
    |- C
    |+ D
    + E
    So from A, next means B, from B next means C, from C it means D and from D it should go to E.
    My main question is: how can I programmatically set the currently selected node in the tree? And I mean not just set the focusRowKey...
    My tree is bound to a ADF Tree Iterator Binding.
    My tree nodes are 'clickable through an action link; this informs a managed bean of the currently selected node, a JUCtrlHierNodeBinding instance.
    <f:facet name="DeptView1Node" >
    <h:panelGroup>
    <af:commandLink text="#{node.Dname}"
    immediate="true"
    action="StartHrmTree"
    >
    <af:setActionListener from="#{HrmTreeTree.tree.rowKey}"
    to="#{HrmTreeTree.focusRowKey}"/>
    <af:setActionListener from="#{node}"
    to="#{HrmTreeTree.selectedNode}"/>
    <af:resetActionListener/>
    </af:commandLink>
    </h:panelGroup>
    </f:facet>
    At that point, in my setSelectedNode method, I can access the Node, its children etc. Methods calls to the tree are less successful; despite their description in the JavaDoc, calls like: getTreeModel().getRowKey() or getContainerRowKey() return null.
    From the Next Node button:
    <af:commandButton immediate="true" actionListener="#{HrmTreeTree.nextNode}" text="&gt;">
    </af:commandButton>
    I invoke the nextNode() method on my bean. When I access the selectedNode that I saved on this bean when the node was clicked on, I no longer can access the children of the node. Even the childIterator property returns null.
    Using the RowSetIterator I can access the current Row, go to the next row in the RSI, access children, so that seems a reasonable approach. However, I do not know how I can make the first child the currently selected node or even how to tell the tree that the child iterator is the current one.
    Using this code:
    // find out if the current Node has a child
    DCBindingContainer container =
    (DCBindingContainer)JsfUtils.getExpressionValue("#{bindings}");
    String iterName = "HrmTreeTreeIterator";
    JUIteratorBinding ib =
    (JUIteratorBinding)container.findIteratorBinding(iterName);
    List ibs =container.getIterBindingList();
    FacesCtrlHierBinding tree = (FacesCtrlHierBinding)container.findCtrlBinding("HrmTreeTree");
    RowSetIterator rsi2 = ib.getRowSetIterator();
    I never seem to be able to get beyond the RowSet iterator of the root level nodes. How can I make a child node's row set iterator the current one? How is it that my selected node object does not know how to access its child-nodes or even its childIterator binding? What refresh operation is required here?
    Any help will be very much appreciated (and credited in the blog article I will write when it all works out).
    Lucas

    Can you try setSelectedRowKeys(RowKeySet newSelectionState) API on the tree? That should change the selection.
    You can do some thing like this to populate the RowKeySet:
    RowKeySet oldSelectionState = null;
    RowKeySet newSelectionState = null;
    oldSelectionState = table.getSelectedRowKeys(); //table is the table component
    newSelectionState = oldSelectionState.clone();
    newSelectionState.clear();
    Object oldRowKey = table.getRowKey(); //Save the orginal rowKey in the variable
    String rowKey = "XXXX" // the key of the row you want to select
    table.setRowKey(rowKey); //set the currency of the table to the row you want to select
    newSelectionState.setContained(true); //add the current row to the selection key set
    table.setRowKey(oldRowKey); //Restore the currency to the old one.
    table.setSelectedRowKeys(newSelectionState); //update the table selection
    ///Now Do some partial update here to change display

  • ADF Tree Traversal from one node to its leafs

    Hello,
    after a titanic effort I have been able to add a checkbox next to each node of an adf tree table.
    This checkbox is based on an "helper" entity attribute (not mapped to a column table on the database).
    My next huge problem is to perform an automatic selection of all the checkboxes next to the nodes under the currently selected one.
    For example, if the user checks a checkbox in the second level, then all the checkboxes next to the nodes under that, belonging to level three and four must be checked.
    If this helps, in my case there are at most four levels.
    Up until now I can get all the information from the currently checked node, but I fail to navigate the hierarchy under it for the automatic checking. I think that one problem is to navigate all the rows in the (only) VO the tree is based on. For example, since the tree is not expanded at the beginning, if I iterate on the VO retrieved from the current selected node at the top level, I can't see any rows corresponding to any children. Maybe I just miss something.
    I have followed this example from Frank Nimphius, which only gets the current selected nodes, as I said, but no more. Maybe this is a good starting point, but I need to advance somehow.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/32-tree-table-from-single-vo-169174.pdf
    Can anyone help?
    Thanks.

    Hi,
    here is a sample of how to search in trees, which actually shows how to traverse trees from a specific node
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/61search-in-rendered-trees-177577.pdf
    Given you have a transient attribute defined, each node (and instance of JUCtrHierNode --> getRow will give you access to the attribute for read/access). Note that because the checkbox is stamped in the context of the tree, upon selecting a parent node, you need to refresh the tree to show the selection state change
    Frank

  • About ADF Tree Shuttle.

    We had requirement to implement shutffle using ADF Tree component. There are nodes and sub-nodes within the ADF tree under both side of the Shuttle control.
    We are experiencing a few wierd problems, one of which is that the Nodes shuttled from one side to the other, but the Node Name are partially missing...
    We wonder if some experts can provide a sound example using ADF Tree shuttle.
    thanks
    Tao

    I don't think we can have tree inside shuttle.

  • ADF Tree: how to access root node after "Show as Top" selected on sub node

    I am currently working on a project that using ADF tree and implementing some search/filter functionality. I need to find the java API calls to get the new root node information after UI user select a sub node in the tree and clicked “show as top"(so search are done only on the current tree. Can someone help on this?

    Hi ,
    In our project we require to implement ADF menu tree inside <af:menulist>.
    We require to show 3-4 child menuitems inside 2 parent menus.
    Home
    --> Inbox
    -->Search
    Patient
    --> Information
    --> Search
    Can you please tell steps to implement <af:menutree> to have child menuitems like Inbox, Search inside parent like Home ? I searched on ADF sites but not much of help there.
    Thanks
    Suhas

  • JDev 11g ADF Tree question on programmatically expand and select node

    I have two questions:
    1. I'm trying to automatically expand the first level tree nodes upon display of the tree. I tried to initialize a RowKeySetImpl object, and added ArrayList of first level nodes, and used setDisclosedRowKeys method. The tree nodes are not rendered properly. If I take the following code out, then the tree content is rendered properly. Here is my code. I have three nodes that I want to expand.
    ArrayList node1 = new ArrayList();
    node1.add(new Integer(0));
    ArrayList node2 = new ArrayList();
    node2.add(new Integer(1));
    ArrayList node3 = new ArrayList();
    node3.add(new Integer(2));
    RowKeySetImpl expand = new RowKeySetImpl();
    expand.add(node1);
    expand.add(node2);
    expand.add(node3);
    this.mainTree.setDisclosedRowKeys(expand);
    2. I have a Panel Splitter, on the first facet, it contains a tree, on the second facet it will be either 'task list', or 'edit task'. When user selects a task in the 'task list', I would like to display 'edit task', while highlight the selected 'task' node on the tree.
    In respond to the ActionListener of the command link (each command link corresponds to task):
    1. How do I determine the properly node in the tree?
    2. I constructed a RowKeySetImpl object and called setSelectedRowKeys. But I get messagebox saying "To display the webpage again, Internet Explorer needs to resend the information you've previously submitted." If I clicked Retry button, the message box just gets displayed again. If I cancel, the node I hardcoded does get selected properly.
    Please help me!
    Thanks,

    I believe this has already been fixed in our main code branch. I will enter a boxer bug and make sure that the fix gets backported to boxer so that it is available in the next boxer patch. If I remember correctly, the issue had to do with trees with a large display area (with default fetchSize of 25). The issue is that the tree has to make multiple round trips to the server in order fill the visible area (view port) on the page.
    Do either of the following workarounds work:
    1) Set a fetchSize attribute on the af:tree tag larger than 25 (<af:tree fetchSize="75">). You may want to increase the rangeSize in your pageDef file as well so that the model rangeSize matches the view fetchSize.
    2) Shrink the size of the tree on the page so that it does not have to make multiple round trips to the server to fill it's view port.

  • Why only gets one node when select many nodes of tree in DWCS4 on Mac OS

    I use tag <mm:treecontrol> to create tree in DWCS4 on Mac OS.
    When I select many nodes in tree, but I only get one node by method: selectedNodes.
    codes of created tree as following:
    <mm:treecontrol name='tree' size='20' multiple noheaders>
         <mm:treecolumn state='hidden'>
              <mm:treenode value='A' state='expanded'></mm:treenode>
              <mm:treenode value='B' state='expanded'></mm:treenode>
              <mm:treenode value='C' state='expanded'></mm:treenode>
    </mm:treecontrol>
    Who can  tell me reasons?
    Thanks!
    comments: if don't use tag <mm:treecolumn>, tree will not show on Mac OS.

    Hi macbig,
    I finally got to look at my sister's computer. The HDD "Repair Disk" found missing threads, missing directory records, etc. and ended with:
    Error: Disk Utility can't repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-
    up files.
    Then, I tried "Verify Disk" and it found invalid volume file count and ended with:
    The volume Macintosh HD was found corrupted and needs to be repaired.
    Error: This disk needs to be repaired. Click Repair Disk
    I guess running Apple Hardware Test is not going to happen. :/
    I've ordered online a new 2.5 disk, make a Maverick boot USB, and start from scratch. Do you have any other suggestions?
    As for the corrupted old hard drive, do you have any suggestions of how to get out the data somehow?
    Thank you so much!

  • How to get UIComponent of the selected node in af:tree with drag and drop

    Hi
    Are there examples showing how one could get a UIComponent using DropEvent to be used with a Popup showing as a custom "context menu" at the target node ?
    Right now, with dropEvent.getDropComponent, we could only get the tree.
    We like to get its selected node so that the popup shows at the node level, not at the tree level.
    Thanks

    Hi Frank
    Thanks for responding.
    We like to show on our custom "context menu" using PopupHints (not using facet name contextmenu) with 3 commandMenuItems.
    Since component id is needed by PopupHints to place this custom "context menu", we tried
    RichTree dropTree = (RichTree)dropEvent.getDropComponent();
    alignId = dropTree.getClientId(context);
    // alignId = pt1:pt_region1:1:pt1:pc1:navTree
    getClientId returns us the tree id and hence the context menu is placed next to tree.
    We like to place the context menu next to a target node of the tree when dragging and dropping.
    But we couldn't figure out how to get that node id.
    In your suggestion,
    List dropRowKey = (List) dropEvent.getDropSite();
    RichTree dropComponent = (RichTree) dropEvent.getDropComponent();
    dropCompoent.setRowKey(dropRowKey);
    how do we then get the id of this node then ? What's the method ?
    Thanks Frank

  • 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

  • Get tree selected node onPageLoad

    We just turned on change persistence to keep our row selections as we traverse our taskflows and pages.
    In one of our pages we have a situation where we have a tree (master) and table (table) whose data is partially based on what is selected in that tree. We use the following logic to determine what is selected in the tree to perform the query on the table.
    public static JUCtrlHierNodeBinding getTreeSelectedNode(RichTree tree) {
    JUCtrlHierNodeBinding node = null;
    if (tree != null) {
    Object oldRowKey = tree.getRowKey();
    try {
    RowKeySet selectedRowKeySet = tree.getSelectedRowKeys();
    if (selectedRowKeySet != null) {
    for (Object selectedRowKey : selectedRowKeySet) {
    tree.setRowKey(selectedRowKey);
    node = (JUCtrlHierNodeBinding)tree.getRowData();
    break;
    } finally {
    tree.setRowKey(oldRowKey);
    return node;
    I hooked up a beforePhase listener on my jspx to call this function and get the (previously - last time user was on this page) selected row and then refresh the table based on the selected tree row's data. This seems to work, but . . . in my log I'm seeing the following error. It seems like for some reason it's trying to convert my Raw UUID to an int, I have no idea why.
    <SortableModel> <_toRowIndex> Invalid rowkey:oracle.jbo.Key[B68F305BF7F5496D8A0FF99EE8F97CF0 ] type:class oracle.jbo.Key
    <SortableModel> <_toRowIndex>
    java.lang.ClassCastException: oracle.jbo.Key cannot be cast to java.lang.Integer
    at org.apache.myfaces.trinidad.model.SortableModel._toRowIndex(SortableModel.java:341)
    at org.apache.myfaces.trinidad.model.SortableModel.setRowKey(SortableModel.java:137)
    at org.apache.myfaces.trinidad.model.ChildPropertyTreeModel._setRowKey(ChildPropertyTreeModel.java:376)
    at org.apache.myfaces.trinidad.model.ChildPropertyTreeModel.setRowKey(ChildPropertyTreeModel.java:178)
    at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:425)
    at oracle.apps.aia.sr.common.JSFUtils.getTreeSelectedNode(JSFUtils.java:392)
    So, I thought that maybe this wasn't the best way to get the selected node. So, after some research I changed the logic to be:
    public static JUCtrlHierNodeBinding getTreeSelectedNode(RichTree tree) {
    JUCtrlHierNodeBinding node = null;
    if (tree != null) {
    CollectionModel treeModel = (CollectionModel)tree.getValue();
    if (treeModel != null ){
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)treeModel.getWrappedData();
    if (treeBinding != null){
    RowKeySet rks = tree.getSelectedRowKeys();
    if (rks != null){
    if (!rks.isEmpty()){
    List firstSet = (List)rks.iterator().next();
    node = treeBinding.findNodeByKeyPath(firstSet);
    return node;
    However, at the time of the beforePhase (I even tried an afterPhase listener) the tree isn't null, but the CollectionModel is null for some reason. I'm not sure where to go from here, any ideas?

    Hi,
    if you use lazy loading (contentdelivery="lazy" then the data is queried after the tree renders. ou would need to set it to immediate to acess data suring the Preparerender phase).
    Frank

Maybe you are looking for

  • Running a Java program on HP UX

    Hi everyone First time in life i have to make a Java program run on HP UX... the program is running perfectly in windows environment..... but when i copy the program to HP-UX and try to run it gives me following error -----------------End Configurati

  • IPhone and iPad cannot connect via Remote to iTunes

    I updated iTunes yesterday and today none of our iPhones or iPads can see the itunes library via Remote. I've gone through the troubleshooting. The best result I got was to get the icon to reappear on remote's devices list. But it won't connect when

  • PDF-X output -- images distorted

    It appears that PDF-X output is, for me at least, a double-edged sword. I have a document which contains several images, to which I have applied drop shadows. There the problem starts. If I print my document directly from Pages, the drop shadows are

  • New to sap - need help in configure backup strategy for SAP XI server.

    hi gurus being a netweaver guy, recently i have been given  the responsibility of few basis activities.like database backup. can any one tell me clear procedure to take both daily online and weekend full offline backup of oracle in to disk first and

  • Connections from mod_wl die off before talking to weblogic 9.2 server

    Hello - I am running into an issue where the mod_wl connector is not completing and leaving the user with a blank screen. The setup is a linux apache server using mod_wl is connecting to weblogic 9.2 on solaris. Turning debug on I see the http reques