By default all nodes expanded  in tree table in jsff page in adf

Hi All,
I have a jsff page there is a table tree on it.I want it to be expanded on page load(or default behavior).
How will I achieve it.
This is to be noted that this jsff page so I can not use before phase or after phase.
There is a property in tree table which is expandAllEnabled it does not expand nodes of tree.
There is one more property in tree table which is Initially expanded it shows only first node of tree table expanded.
Thanks & regards,
Vikas
Edited by: vikasadf on May 16, 2013 8:02 AM

Hi,
It means store the variable ps in pageflowscope variable calles expanedAllNodes and use the disclosed property of treetable.
example:
            if (ps == null) {
                ps = new RowKeySetImpl(true);
                ps = new RowKeySetImpl(true);
                ADFContext.getCurrent().getPageFlowScope().put("expanedAllNodes", ps);
            disclosedRowKeys="#{pageFlowScope.expanedAllNodes}"
Thanks
Raj Gopal K

Similar Messages

  • Selected node in a tree table (via Data Controls and not managed bean)

    I am facing some problems in getting the selected row in a tree table.I have used data controls for creating the tree on the page.
    I have 3 POJO's,ex; Class AB which has a list of Class CD.And Class CD has a list of class EF. (Used for the tree table)
    Now i have a java class, called MyDelegate.java which has a list of AB.I generated data controls off this MyDelegate class and have dropped the ABlist as a tree table (also displaying CD and EF in the tree table).
    It displays fine with nodes of AB,CD (child of AB)and EF(child of CD)
    The tree table is not bound to any managed bean.
    For performing actions on the tree, i create a method - "doSomething() in the delegate class",generate data controls and drop it as a button.
    Inside doSomething(), i need acess to the selected node in the tree (it can be a node of type AB or CD or EF).
    The problem: I always get access to the node of type AB, and not the child nodes no matter what i click in the tree table.
    doSomething(){
    DCBindingContainer dcBindingContainer = (DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
    DCIteratorBinding dcTreeIteratorBinding = dcBindingContainer.findIteratorBinding("lstABIterator");
    RowSetIterator rowTreeSetIterator = dcTreeIteratorBinding.getRowSetIterator();
    DCDataRow rowTree = (DCDataRow)rowTreeSetIterator.getCurrentRow();
    if (rowTree.getDataProvider() instanceof AB) {
              //do something
              AB selectedAB = (AB)row.getDataProvider();
    } else if (rowTree.getDataProvider() instanceof CD){
              //do something
    } else if (rowTree.getDataProvider() instanceof EF) {
              // do something
    How do i access the "selected child node of the tree table" here in the delegate class method? Pls help.

    Hi Frank,
    Thanks for the response. In my case, i dont have a managed bean, so i am slightly unsure how to do it.
    There is a mention "Note that another way to access the treeTable component at runtime is to search for it in JavaServer Faces UIViewRoot. This latter option allows you to write more generic code and does not require to create a page dependency to a managed bean"
    How do i use this adf view root (without a managed bean) to get hold of the selected row in the tree table. Pls help.
    Thanks.

  • How do you change/adjust border width for all the cells in a table created in Pages?

    How do you change/adjust border width for all the cells in a table created in Pages?
    Note- I am trying to figure out how to create and format tables in the latest version of the Pages app on an iPad air (iOS 8.1.1.1) . Creating tables, adding or removing borders for individual/all cells in a table seems straight forward. However the default border style seems to be a heavy black line. How do I change this?
    I found the option add or remove borders for all/ individual cells in a table, however I can't find any option within style/format dialogue screens for changing colour or line thickness for table cells. Likewise I can't find any clear instructions on how to do this in apple help pages or support website
    Btw- I'm assuming  it is possible to customize/adjust the colour & thickness of selected lines in a table created in this app (it's fairly easy to do this word processing apps like MS Word) please let me  know if this is not actually possible in Pages

    They know perfectly well what they took out of Pages '09.
    Well over 90 features.
    Do you think you posting feedback is going to remind them of what they did?
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5 and rate/review it in the App Store, then get back to work.
    Peter

  • JTree - How to Expand all Nodes in the Tree

    I have a tree that has one primary node, two sub-nodes, and multiple sub-sub-nodes under those. I want to expand (show) all these nodes in the tree when the tree first loads. I tried expandRow() but that only seems to expand one row at a time by entering a single integer for the row. Is there any way to expand all rows/nodes when loading the tree?

    see
    http://forum.java.sun.com/thread.jsp?forum=57&thread=148793

  • How to add a button in the child node of the Tree Table?

    Hi All,
    I am having a requirement to create a tree table and it should have a delete button to each child node (screenshot attached).
    Can anyone provide me a sample for how to implement this.
    Thanks in Advance
    Aravindh

    Hi Aravindhan,
    Try something like this:
    var ttDesvios = new sap.ui.table.TreeTable();
      var cbDesviacion = new sap.ui.commons.CheckBox();
      ttDesvios.addColumn(new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "Col1"}),
      template: new sap.ui.commons.Label({text: "Info"}),
      width: "50px",
      ttDesvios.addColumn(new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "Action"}),
      template: new sap.ui.commons.Button({text: "Delete"}).bindProperty("visible", "pathPropertyChild", function(value){
              if(value .............){ return true;} //For child
              else{ return false;} //For parent
      width: "160px",
    Regards
    EDIT: Wrong paste code, that's better!

  • Get All Nodes in a tree

    Can somebody tell me how to get all the node objects (DefaultMutableTreeNode) that are there in JTree?
    Suppose I have created a tree and added 4 nodes to the same, and if I want to get dynamically all the nodes that are there in the tree, what should I do?
    Please help me..as it is urgent
    Thanx in Advance
    Novi

    If you check the documentation to DefaultMutableTreeNode you see that some methods return enumerations, for example postorderEnumeration. You can use these to traverse the tree,
    DefaultMutableTreeNode root = ....;         // start node.
    Enumeration e = root.postorderEnumeration(); // get wanted enumeration
    while (e.hasMoreElements()) {                // all nodes
       DefaultMutableTreeNode node =
          (DefaultMutableTreeNode)e.nextElement(); // get node
       // do something with the node
    }PS. The code compiles but I havent actually run it :(

  • How to display the path of selected node of a tree table.

    Hi,
    I have one use case where I have to display the path of node of tree table which is selected one.
    e.g.
    Suppose the tree table is like this.
    Folder1(root)
              ->folder2
              ->folder3
                        ->folder4
    Now when I select this folder1 then path display should be "/folder1(root)"
    when i select the folder4 then path should be "/folder1(root)/folder3/folder4"
    Hope this one will help to understand my use case..
    Thanks

    Hello,
    try this:
    jsp page:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:tree value="#{bindings.RootNodes.treeModel}" var="node"
                     rowSelection="single" id="t1" expandAllEnabled="true"
                     rowDisclosureListener="#{Test.testDisclosureListener}"
                     selectionListener="#{Test.SelectionListener}">
              <f:facet name="nodeStamp">
                <af:panelGroupLayout id="pgl0">
                  <af:outputText rendered="#{empty node.Link}" value="#{node.Edesc}"
                                 id="ot1"/>
                  <af:goLink rendered="#{!empty node.Link}" targetFrame="_blank" text="#{node.Edesc}" destination="#{node.Link}"  id="gl1"/>
                </af:panelGroupLayout>
              </f:facet>
            </af:tree>
            <af:outputText value="#{bindings.Id.inputValue}" id="ot2"
                           partialTriggers="t1">
              <af:convertNumber groupingUsed="false"
                                pattern="#{bindings.Id.format}"/>
            </af:outputText>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>
    code:
    package testing;
    import java.util.Iterator;
    import java.util.List;
    import model.businessObjects.view.ZamerTreeMenuViewRowImpl;
    import oracle.adf.view.rich.component.rich.data.RichTree;
    import oracle.jbo.Row;
    import oracle.jbo.uicli.binding.JUCtrlHierBinding;
    import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding;
    import org.apache.myfaces.trinidad.event.RowDisclosureEvent;
    import org.apache.myfaces.trinidad.event.SelectionEvent;
    import org.apache.myfaces.trinidad.model.CollectionModel;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class Test{
        public Test(){
        public void testDisclosureListener(RowDisclosureEvent rowDisclosureEvent){
            RichTree tree1=(RichTree)rowDisclosureEvent.getSource();
            CollectionModel model = (CollectionModel)tree1.getValue();
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)model.getWrappedData();
            JUCtrlHierNodeBinding start = null;
            List focus = (List)tree1.getFocusRowKey();
            tree1.setRowKey(rowDisclosureEvent.getAddedSet().iterator().next());
            System.out.println("testing.Test.testDisclosureListener>>"+treeBinding.getPath());
            start = (JUCtrlHierNodeBinding)tree1.getRowData();
    //        ZamerTreeMenuViewRowImpl temp = (ZamerTreeMenuViewRowImpl)start.getRow();
            JUCtrlHierNodeBinding parent=start.getParent();
            String path="";
            ZamerTreeMenuViewRowImpl  r = (ZamerTreeMenuViewRowImpl)start.getRow();
            path+="/"+r.getAdesc();
            while(parent!=null){
                r = (ZamerTreeMenuViewRowImpl)parent.getRow();
                if(r==null){
                    break;
            System.out.println("testing.Test.testDisclosureListener>>"+path);

  • How to retrieve a child node's immediate parent node from a tree table?

    Hello
    Hi,
    I have a category_subcategories table, and I would like to know how to construct a sql and sub-sql for retrieving a child node's immediate parent node.
    Here is my first part of the sql, it only returns the node "Flash"'s parent and its grand-parents:
    SELECT parent.category_name, node.lft, node.rgt
    FROM category_subcategories AS node,
    category_subcategories AS parent
    WHERE node.lft > parent.lft AND node.lft < parent.rgt
    AND node.category_name = 'FLASH'
    ORDER BY parent.lft;
    | name |
    | ELECTRONICS |
    | PORTABLE ELECTRONICS |
    | MP3 PLAYERS | |
    how can I modify this query so that it returns Flash' parent - 'MP3 Players'?
    Thanks a lot
    Sam

    Hi,
    This is an Oracle forum. If you're not iusing Oracle, make that clear. Always say what version of your softwate you're using, whether it's Oracle or anything else.
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data. Explain how you get those results from that data.
    It looks like you're using the Nested Sets technique for modeling a tree. To get the parents of given nodes, do something like this:
    SELECT        parent.category_name
    ,       node.lft
    ,       node.rgt
    FROM        category_subcategories      node     -- Can't use AS with table alias in Oracle
    ,       category_subcategories      parent
    WHERE        parent.lft      IN (
                        SELECT     MAX (lft)
                        FROM     category_subcategories
                        WHERE     lft     < node.lft
                        AND     rgt     > node.rgt
    AND        node.category_name          = 'FLASH'
    ORDER BY  parent.lft; This should work in Oracle 8.1 and up. (I can't actually test it unless you post CREATE TABLE and INSERT statements for some sample data). You may need to modify the syntax a little for your database.
    785102 wrote:
    Hello,
    I tried to implement the solution as follow:
    mysql> select parent.*
    -> from category_subcategories as parent
    -> having parent.lft =
    -> (select max(parent.lft) from
    -> (SELECT parent.category_name, parent.lft, parent.rgt
    -> FROM category_subcategories AS node,
    -> category_subcategories AS parent
    -> WHERE node.lft > parent.lft AND node.lft < parent.rgt
    -> AND node.category_name = 'Sofa'
    -> ORDER BY parent.lft
    -> )
    -> );
    ERROR 1248 (42000): Every derived table must have its own alias
    mysql>
    But I got an error.
    What is wrong with it?What does the error message say?
    Apparantly, in your system (unlike Oracle), every sub-query must have a name. Try something like this:
    select      parent.*
    from      category_subcategories as parent
    having      parent.lft = (
                   select      max(parent.lft)
                   from     (
                             SELECT        parent.category_name
                             ,       parent.lft
                             ,       parent.rgt
                             FROM        category_subcategories      AS node,
                                    category_subcategories      AS parent
                             WHERE        node.lft      > parent.lft
                             AND        node.lft      < parent.rgt
                             AND        node.category_name = 'Sofa'
                             ORDER BY  parent.lft     -- Is this a waste of effort?
                        )  AS got_name_lft_and_rgt
                  )     AS got_lft
    ;What is the purpose of having the inner sub-query, the one I called got_name_lft_and_rgt?
    Also, in Oracle, an ORDER BY clause in a sub-query doesn;t guarantee that any super-queries will keep that order. Why do you have an ORDER BY clause in the sub-query, and not in the main query?

  • Tree table-initially expand all nodes raises error when closing a node 11g

    Hello,
    Frank Nimphius posted a blog entry about how to initially display all the nodes in a tree or table here:
    [http://thepeninsulasedge.com/frank_nimphius/2007/12/19/adf-faces-rc-initially-expanding-all-nodes-in-a-tree-or-tree-table/|http://thepeninsulasedge.com/frank_nimphius/2007/12/19/adf-faces-rc-initially-expanding-all-nodes-in-a-tree-or-tree-table/]
    This works very well. However, when the user tries to close a node, a NullPointerException is thrown.
    Below is the stacktrace.
    Does anyone know how to work around that issue?
    java.lang.NullPointerException
         at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl$Search.find(RowKeySetTreeImpl.java:608)
         at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl._setContained(RowKeySetTreeImpl.java:496)
         at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl.add(RowKeySetTreeImpl.java:97)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRendererUtils.decodeDisclosedRowKeys(TableRendererUtils.java:774)
         at oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer.decodeIncompatiblePropertyKey(BaseTableRenderer.java:198)
         at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:203)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1089)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:714)
         at org.apache.myfaces.trinidad.component.UIXTreeTable.decode(UIXTreeTable.java:133)
         at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1113)
         at org.apache.myfaces.trinidad.component.UIXCollection.invokeOnComponent(UIXCollection.java:1030)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.invokeOnComponent(ContextSwitchingComponent.java:153)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.invokeOnComponent(ContextSwitchingComponent.java:153)
         at oracle.adf.view.rich.component.fragment.UIXPageTemplate.invokeOnComponent(UIXPageTemplate.java:208)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:664)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:303)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         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:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at edu.wisc.csa.web.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:66)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at edu.wisc.csa.web.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:36)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:85)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:257)
         at oracle.security.jps.wls.JpsWlsSubjectResolver.runJaasMode(JpsWlsSubjectResolver.java:250)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:100)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    OK I have tried Frank's suggestion about the 2 entries in the managed bean and it works but I cannot collapse my child node !
    I have a Master-Detail-Detail setup.
    In the Grandparent I have this :
    RowKeySet rks = new RowKeySet(true);
    table1.setDisclosureState(rks);
    this.grandParentTable = table1;
    and in my Parent table I have this :
    RowKeySet rks = new RowKeySet(true);
    table2.setDisclosureState(rks);
    this.parentTable = table2;
    ie the same.
    In my child I have nothing just the default accessors.
    The collapse works OK for the Grandparent but when I click Hide for the Parent it does not do anything - no error message either.
    cheers

  • Expanding and Collapsing All Nodes in a TreeByNestingTableColumn

    Hi Experts,
    I'm using NWDS 7.0.18.
    I have a table with TreeByNestingTableColumn (master column).
    The child nodes are recursive nodes and are loaded at runtime with an action onLoadChildren when clicking the master column. My question is, when the hierarchy is in its initial state, only the root node is loaded into the table. But I want to add functionality for expanding all nodes in the tree. Is there a way to achieve this, I'm a little confused because the Hierarchy children havent been loaded yet.
    Any suggestion will greatly help.
    Regards,
    Kunal.

    Hi Kunal,
    I got your problem.
    To expand & collpase all the child nodes please modify the code as below.
    Create two methods exapndAll &  collapseAll and call these two methods in existing button actions.
    as below.
    public void expandAll( com.sap.tut.wd.treetable.wdp.IPrivateTreeTableView.ICatalogEntriesNode node )
        //@@begin expandAll()
           for (int i = 0; i < node.size(); i++) {
         node.getCatalogEntriesElementAt(i).setExpanded(true);
         if(node.getCatalogEntriesElementAt(i).getIsLeaf()==false)
              expandAll(node.getCatalogEntriesElementAt(i).nodeChildCatalogEntries());
        //@@end
    public void collapseAll( com.sap.tut.wd.treetable.wdp.IPrivateTreeTableView.ICatalogEntriesNode node )
        //@@begin collapseAll()
         for (int i = 0; i < node.size(); i++) {
         node.getCatalogEntriesElementAt(i).setExpanded(false);
         if(node.getCatalogEntriesElementAt(i).getIsLeaf()==false)
              expandAll(node.getCatalogEntriesElementAt(i).nodeChildCatalogEntries());
        //@@end
    public void onActionCollapseAll(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCollapseAll(ServerEvent)
        collapseAll(wdContext.nodeCatalogEntries());
        //@@end
    public void onActionExpandAll(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionExpandAll(ServerEvent)
        expandAll(wdContext.nodeCatalogEntries());
        //@@end
    We are invoking the methods recursively to expand/collapse all the child nodes.
    This works.
    Regards,
    Charan

  • How to make all nodes in a detailed navigation tree open automatically??

    Dear All,
    I have added some iViews to two folders and add these two folders to a workset "Time" and then add "Time" to the role of Employee portal user.
    How to make all nodes expanded automatically when this workset is clicked in EP??
    thanks,
    Zita

    Not surprising...it does not work even if you follow the exact way...
    Role ->
             Workset 1
                          -> Page 1
                          -> Workset 2
                                           -> Page 2
                          -> Workset 3
                                           -> Page 3
    When the user clicks on Role which is the Entry Point, I want the user to see Page1 (works alright) and want the tree node Workset 2 open (doesn't work)...I want tree node Workset 3 closed (which is what happens...)
    The thing is Workset 2 has to be open...
    This is what I've done...I've made the Initial State of Navigation Panel set to "Open"...
    What else is to be done????
    Thanks a lot.
    JP

  • NPE when expanding tree table

    Dear All,
    I have a treetable in my page, and a button that inserts some rows in master detail hiearchy based on some busniess logic.
    And here is my method that expands my tree table which gets called on button click event.
        private void expandAllNodes(){
            org.apache.myfaces.trinidad.model.RowKeySet disclosedTreeRowKeySet = new RowKeySetImpl();
            ViewObject iterCust = u.findIterator("IncDetSubmenuCust_VO1Iterator").getViewObject();
            ViewObject iterType = u.findIterator("IncDetSubmenuType_VO1Iterator").getViewObject();
            ViewObject iterSubmenu = u.findIterator("IncomeDetailSubmenus_VO1Iterator").getViewObject();
            ArrayList<Key> submenuList = new ArrayList<Key>();
            for(Row rowCust=iterCust.first(); rowCust!=null; rowCust=iterCust.next()){
                ArrayList<Key> custList = new ArrayList<Key>();
                custList.add(rowCust.getKey());
                if(iterType.getEstimatedRowCount()>0)
                disclosedTreeRowKeySet.add(custList);
                for(Row rowType=iterType.first(); rowType!=null; rowType=iterType.next()){
                    ArrayList<Key> typeList = new ArrayList<Key>();
                    typeList.addAll(custList);
                    typeList.add(rowType.getKey());
                    if(iterSubmenu.getEstimatedRowCount()>0)
                    disclosedTreeRowKeySet.add(typeList);
                    for(Row rowSubmenu=iterSubmenu.first(); rowSubmenu!=null; rowSubmenu=iterSubmenu.next()){
                        submenuList.add(rowSubmenu.getKey());
            //disclosedTreeRowKeySet.add(submenuList);
            if(treeTableSubmenus !=null)
            treeTableSubmenus.setDisclosedRowKeys(disclosedTreeRowKeySet);
                u.addPartialTargets(treeTableSubmenus);
        }Now when i click the button first time the treetable expands perfectly shows some new master detail hiearchy,
    Then when i click the button second time(busniess logic cond chnged, inserted some new rows in master detail hiearchy) and call this method it gives ,me NPE as following stacktrace.
    <UIXRegion> <_warn> Error processing viewId: /credit_appraisal_tf/credit_appraisal_pf URI: /applicationdetail/credit_appraisal/credit_appraisal_pf.jsff actual-URI: /applicationdetail/credit_appraisal/credit_appraisal_pf.jsff.
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(RowDataManager.java:139)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowKey(FacesCtrlHierBinding.java:633)
         at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel.setPath(FlattenedTreeCollectionModel.java:342)
         at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel.setRowKey(FlattenedTreeCollectionModel.java:303)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils.initModel(TreeRendererUtils.java:303)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils.wrapModel(TreeRendererUtils.java:545)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils.getCollectionObject(TreeRendererUtils.java:345)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.getCollectionObject(TreeTableRenderer.java:762)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.storeHeightAutosized(TableRenderer.java:2366)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:537)
         at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.encodeAll(TreeTableRenderer.java:600)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:538)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    .Any pointers..?
    Thanks ,
    Santosh.
    j 11.1.1.5.0

    Hi Sireesha,
    thanks.
    You should have got few more exceptions stating line number at which the exception has raised, can you check your log?Yes i checked my log.. the exceptions is not raised from my code, its from adf internal lib.
    And it is very difficult trace out the problem without knowing much details on the insertion logic and the relationship of your iterators.
    Can you put more details.Sure
    IncDetSubmenuCust_VO1
      with (1-*)
    IncDetSubmenuType_VO1
      with(1-*)
    IncomeDetailSubmenus_VO1basically i am inserting the records in IncDetSubmenuType_VO1 & IncomeDetailSubmenus_VO1 only..
    on second attempt its giving me NPE.. as shown in my previous post.
    I am inserting the records and then calling my expandAll() method.
    As seen in logs, the NPE is not raised from my code. Seems like some ADF bug or something...
    Thanks,
    Santosh.

  • Tree Table is not getting refreshed properly in Jdev 11.1.2.0

    Hi,
    I am seeing a peculiar issue with tree table not getting refreshed in Jdev 11.1.2.0.
    Let me explain you my use case.
    I have a tree table in a page, where the first column is displayed as selectBooleanRadio component. When user selects this selectBooleanRadio component, that treetable node should get expanded and at the same time all the child records(I have a select boolean check box component(transient attribute) at the child level) for that node should get selected. This is to allow user to unselect the child records, which he/she does not want to process further(some functionality).
    Now when the user selects any radio button, the tree table node is not expanded, but the arrow beside the radio button for that node can be seen as expanded.
    I thought it may be a partial trigger issue, so i tried refreshing the tree table programatically as well. But it was of no use.
    Then I set the partial triggers wrt to SelectBooleanRadio component on the parent container of the TreeTable. After which somehow the node got expanded but the tree table shrinks in width and the actual disclosure functionality of a tree table is lost.
    The same use case works perfectly fine in Jdev 11.1.1.5.
    For reference:
    I created a sample test case(Dept/Emp) in jdev version 11.1.1.5, which works fine. Workspace: http://adf-use-cases.googlecode.com/files/TreeTable1.rar
    But the same test case, when i created in jdev version 11.1.2.0, gives issues. Workspace: http://adf-use-cases.googlecode.com/files/TreeTableUseCase.rar
    If you download the application and run in respective jdev version, you will get to know more about the issue.
    Please let me know, If I am doing anything wrong in the implementation of this use case.
    Any help/suggestions are appreciated.
    Thanks
    Umesh
    Note: My complete application is in Jdev 11.1.2.0, so I can't degrade my jdev version to 11.1.1.5.

    Thanks Frank for the reply.
    But upgrading the jdeveloper to 11.1.2.2 is not an ideal solution for us now, because of the size of the project.
    Some how, the issue of refreshing the tree table is resolved. I am using a command button with clientComponent to true and causing a full page refresh.
    I am not sure, if this is a perfect solution.
    As you said, that this behavior may be an issue with the Jdev version 11.1.2.0, I am using. I am going with the above said approach.

  • Problem in function module for expand in tree display

    hi all,
    i have found a function module which can expand all nodes of the tree.
    it is TREEV_EXPAND_ROOT_NODES.
    CALL FUNCTION 'TREEV_EXPAND_ROOT_NODES' "Expands all Root Nodes
      EXPORTING
        handle =                    " cntl_handle   Handle for Tree Control
        level_count =               " i             Number of Levels to be Expanded
        expand_all_children =       " c
      no_flush =                  " c
      EXCEPTIONS
        FAILED = 1                  "               General Error
        ILLEGAL_LEVEL_COUNT = 2    . "               LEVEL_COUNT Must Be GE 0
    for above function call what value should i give for "handle parameter".
    thanks.

    Hi,
    Please pass the value as below with minor changes as per your requirement.
    DATA: tree TYPE cntl_handle, 
    DATA: TREE_HANDLE TYPE CNTL_HANDLE.
    data: local_rep like sy-repid,
    local_scr like sy-dynnr.
    constants: dynpro_default       type i value -1.
    data: node_table type node_table_type,
    constants : TREEV_NODE_SEL_MODE_SINGLE TYPE I VALUE 0,
      call function 'TREEV_CREATE_SIMPLE_TREE'
           exporting
                owner_repid                    = local_rep
                dynnr                          = local_scr
                left                           = 0
                top                            = 0
                width                          = 45
                height                         = 22
                no_flush                       = space
                shellstyle                     = style
                parentid                       = dynpro_default
                node_selection_mode            = treev_node_sel_mode_single
                node_table_structure_name      = 'MTREESNODE'
           tables
                node_table                     = node_table
           changing
                handle                         = tree_handle
           exceptions
                create_error                   = 1
                tree_control_not_existing      = 2
                cntl_system_error              = 3
                failed                         = 4
                illegal_node_selection_mode    = 5
                missing_node_structure_name    = 6
                error_in_node_table            = 7
                dp_error                       = 8
                illegal_owner_repid            = 9
                table_structure_name_not_found = 10
                others                         = 11.
      if sy-subrc <> 0.
        message e645 with text-745 sy-subrc.
      endif.
    call function 'TREEV_EXPAND_ROOT_NODES'
           exporting
                handle              = tree_handle
                level_count         = 2
                expand_all_children = 'X'
                no_flush            = ' '
           exceptions
                failed              = 1
                illegal_level_count = 2
                cntl_system_error   = 3
                others              = 4.
      if sy-subrc <> 0.
        message e645 with text-743 sy-subrc.
      endif.
    If it is helpfull means reward me with some points.
    Regards
    Chitra

  • Scroller for Tree table

    Hi all,
    I want to put scroller for the Tree table . Here I put Tree table in the PGL(With Scroll property) . When I expand the node in the tree table ,scroller is nor appearing . Please give me the solution .
    Thanks in Advance .

    Hi,
    You can set the layout of the PGL to scroll, and put it inside a panel Stretch layout.
    Something like
      <af:panelStretchLayout id="psl1">
              <f:facet name="bottom"/>
              <f:facet name="center">
    <af:panelGroupLayout id="pgl1" layout="scroll" >
              <af:treeTable ......
              </af:treeTable>
            </af:panelGroupLayout>
    </f:facet>
              <f:facet name="start"/>
              <f:facet name="end"/>
              <f:facet name="top"/>
            </af:panelStretchLayout>-Arun

Maybe you are looking for