Htmlb:tree: Expand All

I tried to implement an "Expand All" functionality for my htmlb:tree. Strangely, I can change the nodes in the tree table, but they are still displayed as closed on the screen.
LOOP AT me->t_tree ASSIGNING <fs> WHERE status = cl_htmlb_treenode=>c_treenode_closed
                                         OR toggle = cl_bdv_co=>c_true.
      <fs>-status = cl_htmlb_treenode=>c_treenode_open.
      <fs>-toggle = cl_bdv_co=>c_false.
ENDLOOP.
Why is this? Has this anything to do with the TOGGLE functionality of the tree (which loads certain subtrees with a new server event) ?

>Has anybody an explanation for this
Delta-Handling is half Black Magic Voodoo anyway.  I assume that the DH server side cache doesn't see any change in those fields (since you have removed them) and therefore doesn't resend them to the client (it only sends changed values).
The Client side cache still has the old values in memory and didn't get an update from the server.  Therefore it still renders the old values.
You might try placing a delta handler block around your tree coding:
<bsp:deltaHandlerBlock id="protectionR2" >
    <htmlb:tree ... />
</bsp:deltaHandlerBlock>
You can try playing with the attributes of the DHBlock.  Try attribute clientCacheClear when you want force a change to the tree.

Similar Messages

  • UIX Tree: "Expand All" Functionality

    Hello,
    I have a question about the Tree in UIX. We are using the Tree component in a UIX Page (JDeveloper 10.1.2). With the tree we also make use of the ClientStateTreeDataProxy class.
    It is possible to expand and collapse the tree, but I want to have 1 button to be able to expand all nodes on the first level of the tree or if this isn't possible to expand all the nodes.
    I have try to simulate this using struts actions, but I'm unable to simulate the state request-parameter. I also try to look if something is possible with the ClientStateTreeDataProxy class. Which possibilities are there to manipulate the tree component?
    Thanks, Dennis

    Thanx Jeanne,
    You brought me on a idea with the UIX Developer's Guide and EXPANDABLE_EXPANDED value.
    I couldn't figure out how the expand property was filled, because it wasn't done in the ADF BC ViewObject. We have a Utility class that creates a DataObject from the ViewObject Data and here the expand property was set.
    Now it was easy to build a ExpandAll option. It is possible to access the HttpServletRequest object were the DataObject is created. By setting a attribute in the request I could react on that and give the expand property indeed the value EXPANDABLE_EXPANDED.
    Dennis

  • Bdc_OkCode Tree Expand All

    Hi EveryBody,
    I urge trees on a screen using a BDC.
    But Three is coming off.
    How can we open all in BDC ?
    Best Regards,
    Rasim BASCH.

    Thank you Felipe,
    But, No, transection is not standard.
    I created a transection own.
    I have a screen, working in the tree structure.
    When you click to another alv I'm calling it.
    But coming off the tree.
    I want all of you to come open.
    Regards...

  • Htmlb:tree differentiate between nodeclick and tree node expander click

    Hi,
    how can i differentiate between nodeclick and tree node expander (to get to its children) click in my event processing in htmlb:tree element.
    <u><b>What i am trying to achieve?</b></u>
    Onload just load root node and its immediate children.
    On node expand get the children of the current node and modify htmlb:tree table2 with additional node inofs.
    on node click  call some client function.
    But my issue is that i am not able to differentiate between node expander click and node click in my event handling. Any help on this is appreciated.
    (I am not using MVC)
    Thanks in advance.
    Regards
    Raja
    Message was edited by: Durairaj Athavan Raja

    After reading your weblog I think I understand better. I did some testing with my example.  I am using the toggle = "true", so that the page returns to the server each time an expander is selected.
    <htmlb:tree id          = "myTree1"
                  height      = "75%"
                  toggle      = "true"
                  title       = "<b><otr>EQI Reporting Tree</otr></b>"
                  width       = "90%"
                  onTreeClick = "myTreeClick"
                  table       = "<%= application->selection_model->itview                             %>" >
      </htmlb:tree>
    However I have not added any coding in my event handler to respond to the expander event.  I only respond to myTreeClick (which loads some data for the given selection).  The BSP tree element itself must be doing the hard work for me. 
      if event_id cs 'tr_myTree1'.
        data: tree_event type ref to cl_htmlb_event_tree.
        tree_event ?= htmlb_event.
        if tree_event->server_event = 'myTreeClick'.
          clear appl->message1.
          appl->selection_model->get_chart_data( appl = appl
                                                 node = tree_event->node ).
        endif.
      endif.
    I pass my entire tree defintion to the element.  It appears that it only sends visible nodes to be rendered. When the expander is selected, I don't have to do anything, the tree re-renders with only the newly visible rows. 
    I tested and turned off the toggle (toggle = "false") and my page took forever to load because it was sending all the nodes to the frontend on the first load.

  • How to make the APEX tree in the "Expand All" shape by default?

    Could anybody please enlighten me on how to make the APEX tree in the "Expand All" shape by default please? I created an APEX tree and by default it's in the "Collapse All" shape. I am using APEX 4.1.0.00.21

    Hi,
    you can check the view source of html and check the onclick code written on that plus sign(Expand All), just copy that onclick javascript code and put it on page javascript event.
    Thanks,
    Jaydip Bosamiya
    +91-76000 23053
    http://jbosamiya.blogspot.com

  • DHTML Tree Expand-Collapse ALL buttons

    Hi
    I am using at DHTML Tree (in APEX 3.0.1) as a menu. I am wondering if it is possible to add buttons (or link) to the region which a user can click to expand all or collapse all nodes in the tree.
    I don not want the tree to be expanded or collapsed all the time (as when using the Tree List template)
    Thanks

    Anyone?

  • How to remove Expand All in view menu of tree table

    Hi,
    I want to remove Expand All in view menu of tree table. How to do that?
    Regards,
    Raghu.

    I am having the exact same problem.
    However, I believe that displaying large amount of data via a tree table is fine as the user is able to quickly drill in to the data of interest.
    It is just that the 'Expand All' option (as implemented) does not make sense in my case.
    Given that I cannot hide it, is there an easy way to change it's behavior so that it does nothing (or provide an 'No implemented' alert).
    I don't have the time/experience to implement custom menu items.
    Thanks

  • Accordion creationPolicy="all" effect on tree expand

    facing very strange problem
    i have placed 2-3 tree component inside Accordion container.
    On each tree's creationComplete i called function to expand first level.
    when I set creationPolicy of Accordion to "all", tree expand is not working.
    and if I removed creationPolicy from Accordion, all trees are expand to first level at creationComplete but only tree will not expanded.
    and idea why this happen?

    Your trees' creationComplete routines are being called at an earlier time than they were before.  So maybe something isn't set up yet that they depend on.

  • 'Expand All' icon in a tree structure?

    Hi experts,
    If we create a tree UI element in ABAP WD, we automatically get a 'Collapse All' icon.Is it possible to have a 'Expand All' icon as well?
    thanks in advance,
    Pras

    Hello Pras,
    You will not get any Collapse All icon when you create a tree UI Element .
    You can expand or collapse the tree by clicking on the  Parent Elements in the tree.
    If you want to explicitly handle the Expand All and Collapse All functionality you need to put a button in the toolbar with name Expand ALL and handle it explicitly by setting attribute EXPANDED to abap_true for each and every element in the tree for Expand All action and vice versa for Collapse All.
    Hope this is of some help.
    Regards,
    Ismail.

  • 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

  • Tree error, after Expand All, then collapsing any node, ORA-6502/6512

    Has anyone seen this problem with the Tree?
    Normal Tree mode works great, can expand and collapse nodes with no problem.
    I can Expand All, Collapse All, and Reset Tree without problems.
    However, if I select Expand All, and then try to collapse any node, I get this error.
    Unexpected error ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1
    My database is 9.2.0.4, and there are 1,138 records in my tree table, with id NUMBER(8), pid NUMBER(8), and name VARCHAR2(100).
    my tree query is:
    select "ID" id,
    "PID" pid,
    "NAME" name,
    'f?p=150:2:&SESSION.::NO::P2_PARAM_ID:'||"ID" link,
    null a1,
    null a2
    from "#OWNER#"."PARAM_TREE"
    order by 3
    My root tree query is:select "ID" id, "PID" pid, "NAME" name, null link, null a1, null a2 from "#OWNER#"."PARAM_TREE" where id=0
    I checked the link to collapse, it was the same in normal mode or Expand All:http://umbriel.xxx.com:7777/pls/EDIWS_GUI_DEV/f?p=150:1:9757663040679228582:CONTRACT,69
    Any ideas, I searched in the forum, saw something on 9.2.0.6 that sounded similar, but it was specific to 9.2.0.6, not 9.2.0.4..
    Thanks, Joe

    Hi all,
    I have created a tree with over 20000 entries but I dont know how many nodes there are. I am using APEX 3.0.1.
    Whenever EXPAND ALL ist pressed I am getting this error:
    Unexpected error ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    I am also using DIV together with javascript in the tree region so that the selected node is always on top of the page.
    like you mentioned. Does this seem like a bug too you?
    Regards,
    Denise

  • Collapse All and Expand All functionality in Tree

    Hi All,
    I am using TreeByNestingTableColumn element to display the tree hierarchy .
    Does anyone knows how to implement Collapse All and Expand All functionality for this tree (if someone have sample code for these functionality then it will be great for me) ?
    Thanks in advance.
    Ravi.

    Hello Ravindra Sahu,
    Code for EXPAND ALL button:
    *step 1:Access node
      lo_nd_tree_hierarchy = wd_context->get_child_node( name = wd_this->wdctx_tree_hierarchy ).
    *step2: Extract all the table entries from node which is binded to table
    lo_nd_tree_hierarchy->get_static_attributes_table(
        IMPORTING
          table = lt_tree_hierarchy ).
    *step3:set element attribute Expanded to abap_true
        loop at lt_tree_hierarchy ASSIGNING <ls_tree_hierarchy>.
          <ls_tree_hierarchy>-expanded = abap_true.
        endloop.
    *step4: Finally the updated data needs to be binded.
      lo_nd_tree_hierarchy->bind_table( lt_tree_hierarchy ).
    Code for COLLAPSE ALL button:
    *step 1:Access node
      lo_nd_tree_hierarchy = wd_context->get_child_node( name = wd_this->wdctx_tree_hierarchy ).
    *step2: Extract all the table entries from node which is binded to table
    lo_nd_tree_hierarchy->get_static_attributes_table(
        IMPORTING
          table = lt_tree_hierarchy ).
    *step3:set element attribute Expanded to abap_true
        loop at lt_tree_hierarchy ASSIGNING <ls_tree_hierarchy>.
          <ls_tree_hierarchy>-expanded = abap_false.
        endloop.
    *step4: Finally the updated data needs to be binded.
      lo_nd_tree_hierarchy->bind_table( lt_tree_hierarchy ).
    Please don't forget giving REWARD points...:-)
    Edited by: Bharath Komarapalem on Jul 11, 2008 9:17 AM

  • Expand all on tree when dataprovider is an object.

    When I first start the application I would like to have the
    tree and all nodes fully expanded. My RemoteService returns an
    object that looks like the snippet below.
    I have seen a lot of code on how to expand all nodes of a
    tree, but I do not have a tree.selectedItem yet as I have just
    created the app. I would like to add an expand all to the
    creationComplete on the tree but I an not sure what to pass the
    tree.expandItem. I have tried to pass tree.firstVisibleItem. I have
    tried to iterate over the children of the root object of my
    dataprovider. I can do it with xml but can't seem to figure it out
    using an object. Any ideas?

    I tested with your data structure and the following worked
    for me. I called expandAll(myTree,true) on creationComplete and all
    nodes were open on load.

  • 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 disable "Expand All" and "Collapse All" when no node in a tree

    I have a <af:tree> inside <af:panelCollection>.
    All items under viewMenu like "Expand", "Expand All Below", "Collapse All Below", "Expand All" , "Collapse All", "Scroll to First" and "Scroll to Last" are implemented by default.
    When there is no node in a tree, "Expand", "Expand All Below", and "Collapse All Below" are grey out.
    However, "Expand All" , "Collapse All", "Scroll to First" and "Scroll to Last" are still enabled to be clicked.
    Is there any way we can diable them when no node?

    When I highlight last node in the tree and all nodes are collapsed, I see "Expand All Below" enabled but "Collapse All Below" disabled. Which is expected. Expand All Below will expand all the child nodes under a node.
    QA filed a bug said that "Expand All Below" should be disabled since no node below it. However, I don't find any place to control them. Can you confirm this? Or you know some way to do this?It it not a bug then. You don't have to control it and framework takes care of enabling and disabling it accordingly.
    If you need to expand all the nodes programatically, check this out.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/78-man-expanding-trees-treetables-354775.pdf
    -Arun

Maybe you are looking for