Expanding Tree nodes

is it possible to expand tree node on rollover instead of
clicking on the triangle?

yes, that worked. thanks.
private function itemRollOverHandler(event:ListEvent):void{
tree.expandItem(event.itemRenderer.data, true, true);
I think I was looking for something like getItem(index)..
something similar to Flash AS 2 components.

Similar Messages

  • Expand tree node by clicking onto the node label

    I have followed this example to expand the nodes with a clic on the tree :
    [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/20-expand-tree-node-from-label-169156.pdf]
    My code:
    JSPX:
    <af:resource type="javascript" source="js/glasspane.js"/>
    <af:tree value="#{bindings.OpcionesPadreView1.treeModel}" var="node"
    rowSelection="single" id="t1" partialTriggers=":::cbNuevCpta"
    binding="#{pageFlowScope.GestionDocumentos.t1}"
    selectionListener="#{bindings.OpcionesPadreView1.treeModel.makeCurrent}">
    <f:facet name="nodeStamp">
    <af:commandImageLink text="#{node.Gesdopcach}" id="ot1"
    action="#{bindings.LoadDir.execute}"
    actionListener="#{bindings.LoadFile.execute}"
    icon="/images/GestionDocumentos/folder20x20.png"
    partialSubmit="true">
    </af:commandImageLink>
    </f:facet>
    <af:clientListener method="expandTree" type="selection"/>
    </af:tree>
    Js:
    function expandTree(evt) {
    alert('In');
    var tree = event.getSource();
    rwKeySet = event.getAddedSet();
    var firstRowKey;
    for (rowKey in rwKeySet) {
    firstRowKey = rowKey;
    if (tree.isPathExpanded(firstRowKey)) {
    tree.setDisclosedRowKey(firstRowKey, false);
    }else {
    tree.setDisclosedRowKey(firstRowKey, true);
    When i clic on the labels the tree doesn't expand, the alert also is not shown. The problem could be the <af:resource>, but i have this tag in all my pages and all javascripts work. I also changed the commandLink with an outputText, but doesn't work.
    Edited by: Miguel Angel on 21/06/2012 12:53 PM

    At least the call the javascript works, but this line doesn't work, anybody know why?:
    rwKeySet = evt.getAddedSet();

  • Expand tree nodes

    Hi Experts,
    Working jdev 11.1.1.3.0.
    we are using tree component on the page which as 6 childs. so if i click on add button once it will add child to that node and once i click on save done will come back to tree page. so everything is working fine. but the problem is once the node is added child node is not expanding. to resolve this issue i am using tree object in session, but while using this process its taking lot of performance.
    manually i can able to expand the tree but if once i add node to the parent tree and coming back to the page node is not expanding i have to manually expand it.
    so can any one suggest me what could be the best approch to expand the tree.
    Thanks,

    Hi,
    Hope followings useful
    http://andrejusb.blogspot.com/2010/02/how-to-traverse-adf-tree.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/20-expand-tree-node-from-label-169156.pdf
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/21-expand-tree-on-initial-render-169158.pdf

  • Moving expanded tree nodes in a JTree

    Hello.
    I have built a JTree that represents my hard disks. The files are sorted alphabetically. I already have built methods to create and remove directories, using the removeNodeFromParent and insertNodeInto methods in DefaultTreeModel.
    Now I would like to rename a directory, so (because of the sorting) sometimes nodes should move some indices up or down. When I use the methods mentioned above it just works okay, but when I have expanded the node to be renamed it and all of its children get collapsed.
    My question is: does anyone know of a convenient method to use for this problem? Thanks in advance.
    Kind regards, Levi.

    Hello guys,
    thanks for all your replies. I've figured it out myself (not with the tree API, though) using two recursive methods.
    Kind regards,
    Levi

  • Cannot expand tree nodes using t:tree tag

    Hi, I have a question.
    I am a beginner of JSF. I am trying to deploy a very simple tree using <t:tree> in my local tomcat server, similar to the following one:
    http://www.irian.at/myfaces/tree.jsf
    The result is that the tree is properly displayed, but I cannot expand the nodes when I click on the "+" icon of the nodes.
    Can someone help me? Thanks a lot!

    Take a look at Lilya Jsf Widgets and Ajax Capabilities at http://qlogic.ma/lilya
    the new era of technology

  • Expand tree node upto a fix level

    Hi all,
    I have a hierarchical tree in forms. I can expand all the node by the following code
    DECLARE
    htree ITEM;
    node ftree.node;
    state varchar2(30);
    BEGIN
    -- Find the tree itself.
    htree := Find_Item('BLOCK17.T_POP'); -- Find the root node of the tree.
    node := Ftree.Find_Tree_Node(htree, '');
    -- Loop through all nodes and expand each one if it is collapsed.
    WHILE NOT Ftree.ID_NULL(node) LOOP
    state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
    IF state = Ftree.COLLAPSED_NODE THEN
    Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.EXPANDED_NODE); END IF;
    node := Ftree.Find_Tree_Node(htree, '', ftree.find_NEXT,Ftree.NODE_LABEL,'', node); END LOOP;
    END;
    But what i need is expand the tree upto a fix level. Suppose uptp level1 or level2. The rest of the level will be collapsed. What can i do? Pls help.
    Best regards
    Tarik

    Using node_depth you would change
    IF state = Ftree.COLLAPSED_NODE THENto
    IF state = Ftree.COLLAPSED_NODE and to_numbeR(ftree.get_tree_node_property(htree, node, node_depth)) <= 2 THENThis might not be the most efficient code because it will still loop through every node in the tree, but I think it will work.

  • Expanding Tree nodes in Web Dynpro

    Hi,
    I have created a recursive tree with two main nodes. These nodes contain subnodes.
    The filling of these nodes has been done in wdDoInit().
    The problem is that whenever I expand the second node, the first node also gets expanded.. even when it (first node) is not expanded.
    When I go to some other window and then come back to this window (wdModify()),it works properly. i.e. the first node does not get expanded.
    Plz help........
    Thanks in Advance.
    Regards,
    harshada.

    Hi Harshada
    It looks strange to me that you use two main nodes on the first level. In the most cases it's enough to have only one node for each level of a tree.
    Are the two nodes mapped to the same context node? If so you do not need the second node I think. Because when the first node is expanded the mapped context node will get the corresponding lead selection. But the lead selection will influence on the second node as well. That's why the tho nodes expand simultaneously.
    BR
    Sergei

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

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

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

  • Tree Nodes has White Outline/Border

    Hi,
    I'm using an ADF tree located inside a panelGroupLayout.
    The panelGroupLayout has the background color "light blue".
    At runtime each tree node is displayed with a surrounding white outline and that can only appear when you have a background color different than white (in my case the panelGroupLayout is "light blue").
    Does anybody knows how to remove that outline? or to change its color?
    Thanks,
    Alain.

    Here are the skin seletors
    tr:tree Component
    Icon Selectors
    Name      Description
    af|tree::expanded-icon      This icon is displayed before the expanded tree node.
    af|tree::collapsed-icon      This icon is displayed before the collapsed tree node.
    af|tree::no-children-icon      This icon is displayed instead of the expanded/collapsed icon, when the node has no children
    af|tree::line-icon      This icon is used as a vertical line between the nodes.
    af|tree::line-middle-icon      This icon is used as the horizontal line in the background of the expand/collapse icon of the node, in the case the node is not the last sibling of its parent node.
    af|tree::line-last-icon      This icon is used as the horizontal line in the background of the expand/collapse icon of the node, in the case the node is the last sibling of its parent node.
    af|tree::node-icon      This icon selector is used in the case the Node class has a getNodeType() method that returns the node type as string. The nodetype gets added to this selector, separated by a ':'. If the node is a container (has children) the following suffixes get added depending on the expanded/collapsed state: '-expanded' / '-collapsed'. e.g. "af|tree::node-icon:container-collapsed", "af|tree::node-icon:container-expanded", "af|tree::node-icon:noncontainer".
    Trinidad properties
    Name      Description
    -tr-show-lines      Valid values are true or false (default true). Determines whether the tree lines are displayed or not. e.g., af|tree {-tr-show-lines:false} will not show the lines of the tree.Timo

  • Drop on a Tree Node - Help!

    On a drop on a tree node, I'd like to get the item that is
    being dropped on.
    Tree object being dropped on: event.currentTarget
    Index of node in tree being dropped on:
    event.currentTarget..calculateDropIndex(event); where event is the
    DragEvent
    dropTarget is a great name for a method that would do this,
    but it returns a display object.
    Some ideas:
    1. Use the index to somehow go through the XML data provider.
    I don't think this is the right way - the XML structure is not list
    based.
    2. The Tree creates a list from the XML. How can I leverage
    that and get the item for a given node index? dropTarget seems like
    the right term, but it returns a display object.
    3. tree.selectedItem and tree.Selected Items return null and
    an array of null, so I can't use that either.

    Hello Brian,
    thanks for your reply.
    The benefit of focusing a node in the tree is the following:
    If a person only uses the keyboard to navigate (e.g. because of him/her being blind) expands a tree node, he expects the focus still being on the expanded tree node afterwards. But if a roundtrip to the server happens (because of a executed onClick-event) the focus after the reload is at the beginning of the page again. Thus the blind person hast to TAB through the whole page again until he reaches the tree node he has expanded.
    I use the com.sapportals.htmlb.* package for the htmlb-elements.
    Almost all elements are underclasses of com.sapportals.htmlb.Component, but Treenode is not.
    I use a model to create tree nodes. TreeNodes are created like this in the Model:
      mComponentsNode = new TreeNode(COMP_NODE_ID);
      mComponentsNode.setComponent(new TextView(COMP_NODE_TEXT));
      mComponentsNode.setOnNodeClick(MODE_ON_CLICK_EVENT);
      mComponentsNode.setOnNodeExpand(TREE_NODE_EXPAND_EVENT);
      mComponentsNode.setOnNodeClose(TREE_NODE_CLOSE_EVENT);
      mComponentsNode.setTooltip(COMP_NODE_TOOLTIP);
      mComponentsNode.setOpen(true);
      mHomeNode.addChildNode(mComponentsNode);
    In the JSP the tree is created like this:
      <hbj:tree id="configTree"
        title=""
        rootNode="configTree"
        rootNodeIsVisible="false">
      </tree>
    Do you have any idea?
    Thanks!
    Regards,
    Bastian

  • 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.

  • WHEN-TREE-NODE-EXPANDED not fire with keyboard in FORMS 10G

    I have a Hierarchical Tree. When i click in any node with mouse, works fine.
    When i use the key rigth and left of the keyboard, the tree expanded, but not fire the WHEN-TREE-NODE-EXPANDED.
    In FORMS 6i works fine.

    It's a bug 4509399. There is a oneoff patch on Metalink:
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:4034066994841324251::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,331369.1,1,1,1,helvetica

  • ADF: Tree Refresh after Expanding a node. Please Frank have a look!

    About this post:
    Re: ADF: Tree Refresh after Expanding a node
    Frank answered that he doesn't notice that behavior. I found out that this happens if an appication uses a custom skin.
    In SRDemoSampleADFBC, SRManage.jspx (Management from menu), if you make the explorer window small enough not to cover the whole tree, you can notice this (the page jumps to the top).
    Now if you change in adf-faces-config.xml the "skin-family" tag to "oracle", you will see that the tree component has changed (it has no triangle icons why this happens) and the page doesn't refresh.
    Minas

    It seems that there's more to the tree expansion icon than the skin definition. We're using the minimal skin and ADF puts out a special character to represent the disclosure symbol (which by the way, renders differently on IE6, than IE7, than Safari or Firefox on Mac). However, switching to the Oracle skin, the disclosure symbol comes out as a full-on image (triangle including the +). We have found this frustrating because the triangles seem not sufficiently suggestive to our users - but switching to the Oracle skin has other issues with white-on-white text.
    But in any case, the tree refresh after node expansion is another annoyance as I described in the other thread linked here (including URL to see problem in action).
    Cheers, Mark

  • 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

  • ADF Faces af:tree expand/collapse node

    Any help appreciated. Is there a way to specify in the tree model if you want a node expanded or collapsed? I am using the ChildPropertyTreeModel and TreeNodeImpl as the nodes. Can I add an additional property to the Tree Node?
    Thanks

    There isn't anything in the framework that lets you specify tree expansion state in the model. The frameword tries to preserve the abstraction between the model (which should only contain data) and the UI component (which handles expansion state).
    You can build a custom renderer for the tree where you can remember which paths from your model are expanded, and then set the expansion state of the tree programmatically by calling the UIXTree.setTreeState() method. It takes a set of paths, with each path corresponding to a path you want to be expanded.

Maybe you are looking for

  • Bug in Print Module, LR3.6, custom package

    Hi everybody, After two days of unequal fight with Print Module bug I hope I finally pinned it down. Hope it saves someone time I have my photos usually cropped in DSLR format (2:3) Printing I use often two popular formats 13x18cm and 15x21cm that ar

  • How to monitor a java service in windows environment

    Hi all, I have a 5 java services running on a windows box. I want to monitor one of those. This service is called "appnew " and appnew interacts with the oracle database. If it is running normally the application name as seen in the task manager is "

  • Extra input prompt

    Help! I am trying to resolve a problem with a rather simple code. Whenever I run the code below I am prompted for input twice. Although I have programmed with Java before (very simple programs), I am just now experimenting with the more advanced topi

  • Alert Log file

    Hi, I'm new at administrating a database (11.2.0.2 on OEL). 1) How often one need to see the alert log file? 2) Why are some Oracle errors not logged in the Alert Log?

  • 8i Memory Consumption in Solaris 8

    Hi, This time I'm hoping I've posted this qustioned to the right place. :-) This is the memory consumtion I took from my Solaris 8 Netra T1 with 256 MB RAM after running the prstat -t command. User Oracle is the Oracle 8.1.6 DB owner. Initial Consump