Hiding nodes in a tree keeping the children visible

I have a tree with a dataprovider which takes the following form:
<details name="Cars">
    <contact_person>aaaa</contact_person>
    <list>
        <car type="A">
            <car name="A1"/>
            <car name="A2"/>
        </car>
        <car type="B">
            <car name="B1"/>
            <car name="B2"/>
        </car>
    </list>
</details>
I want the tree to be shown like this
Cars
     A
          A1
          A2
     B
          B1
          B2
That is I want to hide the contact_person and list nodes.Deleting the nodes from the dataprovider cannot be done.So what i did was to create a custom tree data descriptor by extending DefaultDataDescriptor.Then override the getChildren method and applied a filterfunction to the collection returned by super.getChildren.The problem is when i hide the 'list' node I cannot have the child nodes to show up.So is there any way I can hide 'list' but show the children of 'node'?

I think in getChildren, you want to return car and not list.

Similar Messages

  • Keeping the Menu visible after an action is performed.

    I'm trying to capture the right click events on JMenuItems and display popup menu options for the selected JMenuItem. I've managed to capture the right click and get the Popup ready; however, when the right click is performed, or any other type of "action", the Menu dissappears. How can I keep the menu visible?

    The following code should prevent the menu from closing on a right click:
         class RightClickJMenuItem extends JMenuItem
              public RightClickJMenuItem(String str)
                   super(str);
              protected void processMouseEvent(MouseEvent e)
                   if (e.getModifiers() != MouseEvent.BUTTON3_MASK)
                        super.processMouseEvent(e);
         }

  • Nested Table--How to keep the children together

    You have a purchase order, say, with multiple lines, and multiple shipments per line. For any particular line, you want to either to (1) not split up the children--keep them togother on the same page, or (2) if you do split them up,, repeat the parent (i.e., PO Line) on the next page for identification purposes.
    Any way to do this with XML Publisher?
    Lawrence Profant

    I am using BI Publisher 5.5 on MS Word 2000 I have a table when the data in the table exceeds 1 page the table goes on to then next. However at the bottom of the first page the place where a line should be to close the table appears to be missing. Does anyone have any ideas why this is? By the way on the table row properties I have the following option ticked Repeat as header row at the top of each page.
    Thank you
    Mark

  • Can I keep the scrollbar visible in a text field once focus is lost?

    Hi there,
    I am pre-loading a text field with a large amount of text and making it read-only so that the user can scroll and read.  So essentially I'm not using it for text entry but simply as a scrollable text area as I couldn't find a simpler way to achieve this.
    Only problem is our client doesn't like the fact that the scrollbar doesn't appear until you click into the text field and disappears again when the field loses focus.  It is not immediately clear that there is a large amount of text and that the user needs to scroll to read it all.
    Is there a way of making the scrollbar visible at all times, or is there a better way of implementing a scrollable text area?
    Many thanks,
    Kieran

    Here are my answers..
    1) Is there any way I can programmatically force the scrollbar to be visible at all times?
    Srini: I do not think that is available.
    2) Do you know of any other way to implement a read-only scrollable text area?
    Srini: Make the TextField Type to Protected/ ReadOnly to hold the ReadOnly text and make it Allow Multiple Lines. (I think you did the same)..Usually if you have a long text inside a text field with scrollbar, if the user tries to print, it will only print what ever is visible. So it would be better to check the "Expand to Fit" for Height in the Layout tab and "Allow Page Breaks with in the Content" for TextField (if possible) or the Subform/ Table/ Row that holds the TextField.
    Thanks
    Srini

  • How do i keep the window visible on top

    I'm watching videos and want them to stay 'on top' of all other windows as I switch between applications...like word to explorer to safari to google...I want to keep my video playing visible on 'top' of all other windows.

    Firefox itself does not have native features for this. However, you can download and install the PowerMenu application for Windows at [http://www.abstractpath.com/powermenu/]. It installs very quickly.
    When you want to watch your video, put it into its own Firefox window (you can do this by right-clicking the video tab and selecting "Move to new window". In this new window, right-click any one of the three Windows buttons at the top right corner (Minimize, Resize, Close). Click "Always On Top" from the menu. This window will now remain on top of all other windows until you uncheck "Always On Top".
    I hope that helps!

  • How do I keep the toolbar visible?

    I keep having to manually open the toolbar for every document using F8. I didn't before, so what happened? Is there a way to get this setting back?

    Tried that, can't find anything to check. Looked in every heading but can't find anything useful. When I open Adobe itself I see the toolbar, but no if I open a document directly (i.e. from an attachment). Any other ideas?

  • How do I keep the Slider Visible?

    I have made a worksheet that uses a slider (from the Cell Format tab in the Inspector). I have to click on the cell with the slider to see it, I want to see it all the time; ie it should be visible always.
    How do I do this?
    Thanks in advance for your help,
    Travis

    Travis,
    Don't click anywhere else and the slider will remain visible.  Otherwise it won't. There's no option on this.
    Jerry

  • Question on removing a child node in a tree component - JSF

    When I m trying to delete a child node in a tree component the focus is not transfering to the parent node. I m using the setselected method to set the focus to the current node but not sure how to transfer the focus to parent node once I delete a child node. Please advice.

    Doubleposted: [http://forums.sun.com/thread.jspa?threadID=5389876]. Please stick to one topic or use the edit button.

  • Keeping 2 things visible at once

    Hi, When I have a webpage open, (in this case a banking portal) and then open an email attachment (an invoice) how can I keep the attachment visible while trying to enter info into webpage.??

    Grab the lower right corner of each window and reduce the size of the window so it uses half of the screen.

  • How can I update the children after updating a node in a tree?

    Hi everyone.
    I'm trying to update a subtree programatically while using a managed bean as data source.
    All topics I can find are about using VOs and JUCtrlHierNodeBinding.updateValuesFromRows.
    Now I need to find some way to directly update nodes without any Row. What should I do?
    Here's the code:
    tags:
                                    <af:tree id="tframe" initiallyExpanded="true"
                                             selectionListener="#{backingBeanScope.systemDataFrameBB.onSelectNode}" var="n"
                                             binding="#{backingBeanScope.systemDataFrameBB.tframe}"
                                             value="#{systemDataFrameMB.treeData}" expandAllEnabled="true"
                                             rowSelection="single" fetchSize="-1" contentDelivery="immediate"
                                             immediate="true" summary="summary">
                                        <f:facet name="nodeStamp">
                                                      <af:group>
                                                      <af:outputText value="#{n.is_system?'[SYSTEM]':''}" />
                                                      <af:outputText value="#{n.is_use?'':'[X]'}" />
                                                                     <af:outputText value="#{n.data_frame_name}"/>
                                                      </af:group>
                                        </f:facet>
                                    </af:tree>
    managed bean(systemDataFrameMB):
         private ChildPropertyTreeModel treeData;
         public ChildPropertyTreeModel getTreeData() throws SQLException
              if (this.treeData == null)
                   AuthAMImpl authAM = this.getAppModule();
                   List<DataFrameNode> subTrees = authAM.getDataFrameTrees();    // load with JDBC and POJO
                   DataFrameNode root = new DataFrameNode();      // insert all sub-trees into a new tree
                   root.setData_frame_id(0);
                   root.setData_frame_name("[ROOT]");
                   root.setParent_data_frame_id(Integer.MIN_VALUE);
                   root.setIs_system(true);
                   root.setIs_use(true);
                   if (subTrees != null && subTrees.size() > 0)
                        root.setChildren(subTrees);
                        for (DataFrameNode n : subTrees)
                             n.setParent(root);
                   this.treeData = new ChildPropertyTreeModel(root, "children");      // I guess this is the simplest way to show hierachical data...
              return this.treeData;
    model:
    public class DataFrameNode
         private int data_frame_id;
         private String data_frame_name;
         private int parent_data_frame_id;
         private boolean is_use;
         private boolean is_system;
         private DataFrameNode parent;
         private List<DataFrameNode> children;
            // getters/setters are omitted....
    backing bean(systemDataFrameBB):
            // edit event handler
         public void onEditResult(DialogEvent de)
              String name = (String)this.getItName().getValue();
              boolean isUse = this.getSbcIsUse().isSelected();
              SystemDataFrameMB dfMB = (SystemDataFrameMB)JSFUtils.resolveExpression("#{systemDataFrameMB}");
              try
                   node.setData_frame_name(name);
                   node.setIs_use(isUse);
                   dfMB.updateNode(node);                   // persist changes, this method will change all the children's 'is_use' field to FALSE when isUse == FALSE
                   AdfFacesContext.getCurrentInstance().addPartialTarget(this.getTframe());      // refresh the tree, only the edited node will be updated, but I want the tree to update the whole sub-tree to reflect the change on all its children
              catch (Exception e)
                            // omitted...
            }

    I solved the problem using RichTree.visitChildren :)
    Maybe not the proper way, but at least it works...
                                    <af:tree id="tframe" initiallyExpanded="true"
                                             selectionListener="#{backingBeanScope.systemDataFrameBB.onSelectNode}" var="n"
                                             binding="#{backingBeanScope.systemDataFrameBB.tframe}"
                                             value="#{systemDataFrameMB.treeData}" expandAllEnabled="true" rendered="true"
                                             rowSelection="single" fetchSize="-1" contentDelivery="immediate"
                                             immediate="true" clientComponent="true" summary="summary">
                                        <f:facet name="nodeStamp">
                                            <af:panelGroupLayout id="tg">
                                                <af:clientAttribute name="node_path" value="#{n.node_path}"/>
                                                <af:outputText id="tIsSystem" value="#{n.is_system?'[SYSTEM]':''}"/>
                                                <af:outputText id="tIsUse" value="#{n.is_use?'':'[X]'}"/>
                                                <af:outputText value="(#{n.data_frame_id})#{n.data_frame_name}"/>
                                            </af:panelGroupLayout>
                                        </f:facet>
                                    </af:tree>
    private static final String PARENT_NODE_PATH = "PARENT_NODE_PATH";
    // all nodes should have a 'node_path' property whose value looks like 'id1/id2/id3'
    // keep path on view root
    FacesContext.getCurrentInstance().getViewRoot().getAttributes().put(PARENT_NODE_PATH, node.getNode_path());
    // visit the whole tree to find specified nodes
    VisitContext vc = VisitContext.createVisitContext(FacesContext.getCurrentInstance());
    RichTree.visitChildren(vc, this.getTframe(), new VisitCallback()
              @Override
              public VisitResult visit(VisitContext visitContext, UIComponent uIComponent)
                   if (uIComponent instanceof RichPanelGroupLayout &&
                        visitContext.getFacesContext().getCurrentPhaseId().equals(PhaseId.INVOKE_APPLICATION))
                        String parentPath = (String)visitContext.getFacesContext().getViewRoot().getAttributes().get(PARENT_NODE_PATH);
                        if (parentPath != null & parentPath.length() > 0)
                             // if current node is in the sub-tree then update its state
                             String path = (String)uIComponent.getAttributes().get("node_path");
                             if (path != null && path.length() > parentPath.length() && path.charAt(parentPath.length()) == '/')
                                  RichOutputText t = (RichOutputText)uIComponent.findComponent("tIsUse");
                                  JSFUtils.refreshTarget(t);
                   return VisitResult.ACCEPT;
         });there might be another solution which uses JavaScript:
    I found out that the HTML tag ADF generated has a attribute like "id='0_1_2_3'", that means I can find the sub-tree with JavaScript.
    But it was not tested 'cause I don't think it would be stable.
    it looks like this:
    StringBuffer clientId = new StringBuffer(node.getLevel_id() * 4);
    while (node != null)
         clientId.insert(0, node.getData_frame_id());
         clientId.insert(0, '_');
         node = node.getParent();
    JSFUtils.executeScript("disableSubTree('" + (clientId.length() > 0 ? clientId.substring(1) : clientId.toString()) +"')");
                <af:resource type="javascript">
                  function disableSubTree(id)
                      // find the adfrichtree component and traverse it, trying to find the sub-tree and modify the nodes
                </af:resource>

  • Listing the children of a tree node

    Hi
    I have a jsf page where left side is a tree and the right side is divided into two panes(Top & Bottom). Top pane in the edit view of the selected node which is working fine using a backing bean to set the current row(As in the example of Devloper Guide Book).In the bottm pane I need to list the table of children of the selected node. How can I do this ?
    The tree is built on the basis of parent id in the same table.
    Thanks
    Edited by: Suneesh Raman on Sep 5, 2010 4:23 AM

    Hi,
    if you use ADF
    1. Open the table (Property Inspector "pencil" icon in toolbar). Then expand the tree node "DataSource" area and open the EL edito by pressing the button).
    2. Navigate to the iterator that represents the input form / table. Make sure that the table is built on an iterator not dependent on any other collection
    see example 50 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
    Frank

  • How to calculate the last selected item in a tree node where we can customize the list to the node.

    Hi,
    I'm new to the Flex field. I got a task where i have a tree (TREE is the id) with X and Y as nodes. In X i have got a list of pages(dataprovider is array collection) added dynamically(means User can configure the pages).On selecting last item(last page) in the list of X node, the  view will be presented with a component say Xlast on the right side which is in view stack. In that component , there is button called NEXT which has to be greyed out for the last page. I tried by calling the below code on viewChange event
    if(viewstack.selectedchild == XlastpageId)
    Nextbtn.enabled = false;
    but this will work only when we know XlastpageId is the lastpage for the tree. but how to implement this when we dont know which is the last page of the X node in a Tree.
    I also tried by calculating the children of the tree on tree click event which is
    if (Tree.selectedItem == TREE.numChildren - 1)
    Nextbtn.enabled = false;
    i know this is wrong because we have 2 children for the tree( X and Y) so it is showing 2-1 and the button is greyed out for the first click.
    Please help me out.
    Thanks in Advance,
    Sw

    Hi,
    According to your post, my understanding is that you want to monitor the last login user’s details.
    There is no out of the box way to achieve it in SharePoint.
    We can use cookie to be a flag for checking whether there is an user just log in. After the page loaded, if the cookie is null, it suggests that there is an user just log in our site, then we
    can get this user’s information using JavaScript Object Model and add the information into a custom list. With this list, we can monitor user’s login details.
    Refer to the following link:
    https://social.technet.microsoft.com/Forums/en-US/0cd4d531-cb61-4d90-aa70-413267f4a735/how-to-know-login-and-logout-details-of-a-user-in-sharepoint-online-2013?forum=sharepointdevelopment
    Besides, here are two similar posts for your reference:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/1a35283e-0f2a-49b8-b330-801a3cfcd890/programatically-get-all-current-logged-in-users-list-for-a-sharepoint-site?forum=sharepointdevelopmentprevious
    https://social.technet.microsoft.com/Forums/en-US/10953be3-cb1c-40c7-9454-545c8338b551/how-to-know-login-users-count-and-their-details-in-sharepoint-2010-web-application?forum=sharepointgeneralprevious
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • How to make the tree sibling nodes sorting  in memory per the VO default?

    Hi,
    I have a question on the uncommitted tree nodes sorting. The tree was built using the same VO with the view link to itself (parent/child relation). I have defined a default sorting on my VO. Now if I insert a node to the tree, the sibling nodes may not sort correctly if it is not committed. I tried to insert it to the RowsetIterator at the right position, it seems OK. but when you right click or something that make the tree to refresh, the order will mess up. If I do an auto save after each action, everything looks OK. But the fusion pattern is to do a global save, I have to manipulate the tree with the uncommitted data. I know I can set the view object's SQL mode to do the in-memory sorting. But not sure if it works on the tree structure, because it is not a single RowsetIteroator.. Can someone give an advice? Many thanks.
    Edited by: user736572 on Jan 20, 2012 2:48 PM

    Thanks Sudipto for trying to help. I did try that, and as I mentioned in the previous posting, it doesn't work for the tree nodes (multiple RowSetIterator). the following is my code, where the treeVO is the vo instance for the firstLevel tree nodes and it has view link to its children. I am not sure how to sort all children for each level. Even for the first level where I did the explicit sorting in memory, it still not sorting at all.
    treeVO.setSortBy("code");
    treeVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS|ViewObject..QUERY_MODE_SCAN_DATABASE_TABLES);
    treeVO.executeQuery();

  • Fetch the index of the node in a tree

    hi,
    i am using a recursive tree structure,
    i need to get the index value of a selected node in a tree structure,
    can any one help me?
    thanks in advance,
    Regards,
    Meyyappan

    Hello Ganesh,
    in that case, just call
      lr_node_tmp = context_element->get_node().
      lr_parent_element = lr_node_tmp->get_parent_element().
      lr_parent_node = lr_parent_element->get_node().
    Best regards,
    Thomas

  • Want to keep the data on one node and allow remote nodes to read it?

    by default, we have a distributed cache with backupcount=1 and data is kept over all the members in equal parts
    is there a way to do set it another way: i need only one 'main' node to put entries into the cache and keep them locally, while remote nodes can only read entries? the reason for that - i want to update the entries on the main node quite frequently (do not them travel anywhere over the network) - while remote read operations are infrequent. Also, Iwant the whole dataset survive the shutdown of any secondary node. In other words, I need 'all eggs in one backet' with remote read access.

    Andrey -
    Provided the 'remote/secondary' nodes are within the local area network, you could use a dedicated distributed cache service; storage enabled
    on the 'main' node and storage disabled on the 'secondary' nodes. Access from outside the LAN will require configuring a proxy service on the
    'main' node and 'secondary' node access over Coherence*Extend.
    /Mark

Maybe you are looking for

  • Unable to create per forma invoice w.r.t to Free of charge delivery

    Hi Experts, I create a free of charge delivery order type ZFD (copy from order type FD). I create a delivery (VL01N) with reference to free of charge delivery order & done PGI. But when i want to create Per forma invoice of this delivery with referen

  • Can't see my folios online...

    Hi, I've created folios with the Folio Builder panel in InDesign. I'm logged in from InDesign and the online DPS Folio Producer panel with the same login, but my folios aren't showing up in the online panel. Is this because I haven't purchased a memb

  • Problem with purchasing from itunes

    Has anyone encountered a problem when purchasing a song on credit. I have an account with credit and get a message a valid address is necessary to purchase using store credit. I don't understand I just downloaded on Tuesday and now can't get anything

  • Which slide format should I select if I want to play the presentation in 16:9 on a television?

    Hello everyone; I have create a little pres in Keynote 8 and exported it to iDVD in order to burn it on a DVD. The aim is to play the DVD on a 16:9 TV. But when I played the DVD, I had 2 black blocks on each side of the presentation. Could anyone tel

  • Nikon D7100 and Premiere Pro

    I have experience editing in Adobe Premiere Pro CS4 and want to upgrade to CS6. I have recently changed to using the Nikon D7100 to produce video instead of a traditional video camera. It is my understanding that Adobe does not directly support the .