Disabling the tree nodes.

hi,
Can anyone tell me , Is it possible to disable the tree nodes?How??so that user cannot perform any action
on tree nodes i.e, expanding the tree node or double clicking the tree node.
Thankx in advance,
Manish.

hi,
Can anyone tell me , Is it possible to disable the tree nodes?How??so that user cannot perform any action
on tree nodes i.e, expanding the tree node or double clicking the tree node.
Thankx in advance,
Manish.

Similar Messages

  • Lables fully not visible in the Tree node

    Hi friends,
    Some text in the tree node were not visible fully.
    example : instead of documentation, it just displays doc...
    instead of Library, it just displays lib....
    And the problem doesn't appear continuously. Sometime the text is fully visible and some time it doesn't.
    If I expand the tree the text is fully visible again. I couldn't reproduce the issue continuously. I tried tree.repaint(), tree.validate(), tree.invalidate(), tree.revaidate(). but it didn't work.
    Anybody can suggest what would be the exact problem?
    Thanks in advance.

    It's hard to say without seeing the code for TreeTable. But they probably have something like an addNode mothod for the TreeTableNode which will take care of all the updates for you. If you want to do it youself, you will probably have to get the data Model (tree.getModel()???)behind the TreeTable and use one of the fire... methods on it like fireRowChanged(???) or fireTableChanged(???). I would suspect Sun would do it this way.

  • Not able to copy the tree node text in solaris, while easily done in window

    Hi,
    I m not able to copy the text present on the tree's node to terminal or other text editor in solaris. I m using <Shift><control> C and V comaand for the same but the text is not being copied and pasted on the text pad or the terminal window.
    While the same is possible in windows OS using ctrl+c and ctrl+v command.
    Please suggest the possible solution for the same, is there any property of the tree/OS needs to be set?

    Help About says I'm on 20.0.1
    Up until last week, I was able to use the tab key when typing emails and other multi-line text boxes.
    Suddenly the behavior of the tab key changed. This isn't the first time. It's been quite a while ago that the function of the tab key changed from indenting to moving around the page, then after some time it changed back to indenting.
    Can we get this fixed and leave it alone, please?
    I may give one of those add-ins a try, but my problem with add-ins is that they break when FF is patched or upgraded, then I'm left with out the solution they provide.
    Can we just fix Firefox, please?
    Thanks,
    Frank
    P.S. Another potential fix I came across suggested starting FF in safe mode to see if the problem goes away. It does not. It seems to be a change to FF that appeared after an update last week. On or just befor 24 Apr.

  • How to display the tree nodes distinctivly.

    Hay all,
    Frnds , i am facing a problem. I have created a tree whose each node consisted of a checkbox and a label. For that i have used DefaultMutableTreeNodes for tree nodes and a TreeCellRenderer. Is there any method or way to display some nodes distinctively(may be in different color or something else). Plz tell me soon its very urgent.

    Hi Jürgen,
    See http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
    Only Worksets and Roles are not described, anyhow, doing a bit research via decompiling or just by searching on SDN will bring you the needed extra info; just as an example for roles access: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401
    Hope it helps
    Detlev

  • FX - the transition of the tree node arrow icon

    I want to know how can I realize this following transition effect in the TreeView:
    There is a arrow icon for collapse and expand. I want to see that this arrow icon appears when the tree view obtains its focus and disappears when it looses the focus. The appearance time is defined to 1s and the disappearance time is 2s.
    Anyone could help me ^^ ? Thanks.

    You have to use a Cell factory to accomplish this. Here is a quick and dirty example.
            TreeView<String> treeView = new TreeView<String>();
            treeView.setCellFactory(new Callback<TreeView<String>,TreeCell<String>>() {
                @Override
                public TreeCell<String> call(TreeView<String> p) {
                    return new TreeCell<String>() {
                        @Override
                        protected void updateItem(String item, boolean empty) {
                            super.updateItem(item, empty);
                            setText(item);
                            javafx.animation.FadeTransitionBuilder.create()
                                .node(getDisclosureNode())
                                .duration(Duration.seconds(2d))
                                .fromValue(1d).toValue(0d)
                                .build()
                            .play();
            });

  • Problem in adding icon to the tree node

    I am using pv.jfcx.PVNode to create the node.It has a default icon at the node.I need to replace the default
    icon with the gif file.so i have included root.setImageAt(new ImageIcon("plus.gif"), 0);
    .but this is not working still the default node icon remains .how do i paint my gif image?can any one help me?
    pv.jfcx.PVNode root = tree.getRoot();
              root.setImageAt(new ImageIcon("plus.gif"), 0);
              pv.jfcx.PVNode one = new pv.jfcx.PVNode("Node 1");
              one.add(new pv.jfcx.PVNode("One"));
              one.add(new pv.jfcx.PVNode("Two"));
              one.add(new pv.jfcx.PVNode("three"));
              root.add(one);

    What is the class pv.jfcx.PVNode? Maybe I missed something along the line.
    But for Trees you can usually use the method of your TreeCellRenderer to set icon. The method are setOpenIcon, SetCLosedIcon, and setLeafIcon, and mainly setIcon.

  • Commandtoolbarbutton enabling/disabling based on tree node selection

    i am using the tree tag to generate a set of nodes and every node is a command link.... i have a set of commandtoolbarbuttons on top of the tree... the functionality i am trying to obtain is on press of the tree node( i.e, command link ) the commantoolbarbuttons are enabled or disabled.. on press of link i am able to get the tree node selected in the backing bean, and also i am setting some variables for the "disabled" attribute of commandtoolbarbutton. The problem i am facing here is i have a partialtrigger attribute in the commandtoolbarbutton pointing to the commandlink id. But the partial trigger is unable to identify the command link id outside the tree. And i cannot put the commandtoolbar buttons inside the tree...
    Can anyone please let me know how can i resolve this?? or is there anyother approach??
    The source code is as mentioned below...
    <af:panelGroupLayout layout="horizontal" halign="right">
    <f:facet name="separator">
    <af:spacer width="5px"/>
    </f:facet>
    <af:toolbox id="mainTab_box" >
    <af:toolbar id="mainTab_bar">
    <af:spacer width="80"/>
    <af:commandToolbarButton icon="/resources/images/new_ena.png" partialSubmit="true"
    shortDesc="New" id="ctb1_mainTab" disabled="#{nodeSelectionHandler.createToolbar}" partialTriggers="cl1"/>
    <af:commandToolbarButton icon="/resources/images/update_ena.png" partialSubmit="true"
    shortDesc="Update" id="ctb2_mainTab" disabled="#{nodeSelectionHandler.editToolbar}" partialTriggers="cl1"/>
    <af:commandToolbarButton icon="/resources/images/delete_ena.png" partialSubmit="true"
    shortDesc="Delete" id="ctb3_mainTab" disabled="#{nodeSelectionHandler.cancelToolbar}" partialTriggers="cl1"/>
    <af:commandToolbarButton icon="/resources/images/importIcon.png" partialSubmit="true"
    shortDesc="Import" id="ctb4_mainTab" disabled="#{nodeSelectionHandler.exportToolbar}" partialTriggers="cl1"/>
    <af:commandToolbarButton icon="/resources/images/exportIcon.png" partialSubmit="true"
    shortDesc="Export" id="ctb5_mainTab" disabled="#{nodeSelectionHandler.importToolbar}" partialTriggers="cl1"/>
    </af:toolbar>
    </af:toolbox>
    </af:panelGroupLayout>
    <af:panelGroupLayout layout="scroll">
    <af:tree var="node"
    value="#{browserTreeModel}"
    id="browsertree" inlineStyle="min-width:200px;min-height:400px;width:100%;height:100%"
    rowSelection="single" clientComponent="true" contentDelivery="immediate"
    >
    <f:facet name="nodeStamp">
    <af:panelGroupLayout id="pgl10">
    <af:image id="nodeIcon"
    inlineStyle="margin-right:3px; vertical-align:middle; height:16px; width:16px;"
    shortDesc="directory icon" rendered="#{node.destination != null}"
    source="#{node.destination}"/>
    <af:commandLink text="#{node.text}"
    id="cl1"
    disabled="false" partialSubmit="true"
    actionListener="#{nodeSelectionHandler.selectionPerformed}" >
    <f:attribute name="nodeId" value="#{node.id}"/>
    <f:attribute name="operation" value="#{node.associatedOperation}"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </f:facet>
    </af:tree>
    </af:panelGroupLayout>

    With apologies, you're not aware of ELUtils class devised by Steve Muench:
    package view;
    import javax.faces.context.FacesContext;
    import javax.faces.el.MethodBinding;
    import javax.faces.el.ValueBinding;
    public class ELUtils {
      public static boolean test(String booleanExpr) {
        return Boolean.TRUE.equals(get(booleanExpr));
      public static String getAsStringWithDefault(String expr, String defaultExpr) {
        return (String)getWithDefault(expr, defaultExpr);
      public static String getAsString(String expr) {
        return (String)get(expr);
      public static Integer getAsInteger(String expr) {
        return (Integer)get(expr);
      public static Object get(String expr) {
        FacesContext fc = FacesContext.getCurrentInstance();
        ValueBinding vb = fc.getApplication().createValueBinding(expr);
        return vb.getValue(fc);
      public static Object getWithDefault(String expr, String defaultExpr) {
        Object exprVal = get(expr);
        return exprVal != null ? exprVal : get(defaultExpr);
      public static void set(String expr, String value) {
        Object valToSet = value;
        if (isELExpr(value)) {
          valToSet = get(value);
        set(expr, valToSet);
      public static void set(String expr, Object value) {
        FacesContext fc = FacesContext.getCurrentInstance();
        ValueBinding vb = fc.getApplication().createValueBinding(expr);
        vb.setValue(fc, value);
      private static boolean isELExpr(Object o) {
        if (o instanceof String) {
          String str = (String)o;
          str.trim();
          return str.startsWith("#{") && str.endsWith("}");
        return false;
      public static Object invokeMethod(String expr, Class[] paramTypes, Object[] params) {
        FacesContext fc = FacesContext.getCurrentInstance();
        MethodBinding mb = fc.getApplication().createMethodBinding(expr, paramTypes);
        return mb.invoke(fc, params);
      public static Object invokeMethod(String expr, Class paramType, Object param) {
        return invokeMethod(expr, new Class[] { paramType }, new Object[] { param });
    }Try that.
    CM.

  • 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();

  • How to hide a tree node from the GUI but still keep it in the tree model?

    Hi, All
    I used a JTree in my project in which I have a DefaultTreeModel to store all the tree structure and a JTree show it on the screen. But for some reason, I want to hide some of the nodes from the user, but I don't want to remove them from the tree model because later on I still need to use them.
    I searched on the web, some people suggested method to hide the root node, but that's not appliable to my project because I want to hide some non-root nodes; Some people also suggested to collapse the parent node when there are child to hide, it is not appliable to me either, because there still some other childnodes (sibling of the node to hide) I want to show.
    How can I hide some of the tree node from the user? Thanks for any information.
    Linda

    Here's an example using a derivation of DefaultTreeModel that shows (or does not show) two types of Sneech (appologies to the good Dr Zeus) by overiding two methods on the model.
    Now, there are many things wrong with this example (using instanceof, for example), but it's pretty tight and shows one way of doing what you want.
    Note: to make it useful, you''d have to change the implementation of setShowStarBelliedSneeches() to do something more sophisticated than simply firing a structure change event on the root node. You'd want to find all the star bellied sneech nodes and call fireTreeNodesRemoved(). That way the tree would stay expanded rather than collapse as it does now.
    import javax.swing.JTree;
    import javax.swing.JScrollPane;
    import javax.swing.JOptionPane;
    import javax.swing.JCheckBox;
    import javax.swing.JPanel;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.DefaultMutableTreeNode;
    import java.awt.Dimension;
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Enumeration;
    class FilteredTree
         private class PlainBelliedSneech {
              public String toString() { return "Plain Bellied Sneech"; }
         private class StarBelliedSneech {
              public String toString() { return "Star Bellied Sneech"; }
         private class FilteredTreeModel
              extends DefaultTreeModel
              private boolean mShowStarBelliedSneeches= true;
              private DefaultMutableTreeNode mRoot;
              FilteredTreeModel(DefaultMutableTreeNode root)
                   super(root);
                   mRoot= root;
              public Object getChild(Object parent, int index)
                   DefaultMutableTreeNode node=
                        (DefaultMutableTreeNode) parent;
                   if (mShowStarBelliedSneeches)
                        return node.getChildAt(index);
                   int pos= 0;
                   for (int i= 0, cnt= 0; i< node.getChildCount(); i++) {
                        if (((DefaultMutableTreeNode) node.getChildAt(i)).getUserObject()
                                            instanceof PlainBelliedSneech)
                             if (cnt++ == index) {
                                  pos= i;
                                  break;
                   return node.getChildAt(pos);
              public int getChildCount(Object parent)
                   DefaultMutableTreeNode node=
                        (DefaultMutableTreeNode) parent;
                   if (mShowStarBelliedSneeches)
                        return node.getChildCount();
                   int childCount= 0;
                   Enumeration children= node.children();
                   while (children.hasMoreElements()) {
                        if (((DefaultMutableTreeNode) children.nextElement()).getUserObject()
                                            instanceof PlainBelliedSneech)
                             childCount++;
                   return childCount;
              public boolean getShowStarBelliedSneeches() {
                   return mShowStarBelliedSneeches;
              public void setShowStarBelliedSneeches(boolean showStarBelliedSneeches)
                   if (showStarBelliedSneeches != mShowStarBelliedSneeches) {
                        mShowStarBelliedSneeches= showStarBelliedSneeches;
                        Object[] path= { mRoot };
                        int[] childIndices= new int[root.getChildCount()];
                        Object[] children= new Object[root.getChildCount()];
                        for (int i= 0; i< root.getChildCount(); i++) {
                             childIndices= i;
                             children[i]= root.getChildAt(i);
                        fireTreeStructureChanged(this, path, childIndices, children);
         private FilteredTree()
              final DefaultMutableTreeNode root= new DefaultMutableTreeNode("Root");
              DefaultMutableTreeNode parent;
              DefaultMutableTreeNode child;
              for (int i= 0; i< 2; i++) {
                   parent= new DefaultMutableTreeNode(new PlainBelliedSneech());
                   root.add(parent);
                   for (int j= 0; j< 2; j++) {
                        child= new DefaultMutableTreeNode(new StarBelliedSneech());
                        parent.add(child);
                        for (int k= 0; k< 2; k++)
                             child.add(new DefaultMutableTreeNode(new PlainBelliedSneech()));
                   for (int j= 0; j< 2; j++)
                        parent.add(new DefaultMutableTreeNode(new PlainBelliedSneech()));
                   parent= new DefaultMutableTreeNode(new StarBelliedSneech());
                   root.add(parent);
                   for (int j= 0; j< 2; j++) {
                        child= new DefaultMutableTreeNode(new PlainBelliedSneech());
                        parent.add(child);
                        for (int k= 0; k< 2; k++)
                             child.add(new DefaultMutableTreeNode(new StarBelliedSneech()));
                   for (int j= 0; j< 2; j++)
                        parent.add(new DefaultMutableTreeNode(new StarBelliedSneech()));
              final FilteredTreeModel model= new FilteredTreeModel(root);
              JTree tree= new JTree(model);
    tree.setShowsRootHandles(true);
    tree.putClientProperty("JTree.lineStyle", "Angled");
              tree.setRootVisible(false);
              JScrollPane sp= new JScrollPane(tree);
              sp.setPreferredSize(new Dimension(200,400));
              final JCheckBox check= new JCheckBox("Show Star Bellied Sneeches");
              check.setSelected(model.getShowStarBelliedSneeches());
              check.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        model.setShowStarBelliedSneeches(check.isSelected());
              JPanel panel= new JPanel(new BorderLayout());
              panel.add(check, BorderLayout.NORTH);
              panel.add(sp, BorderLayout.CENTER);
              JOptionPane.showOptionDialog(
                   null, panel, "Sneeches on Beeches",
                   JOptionPane.DEFAULT_OPTION,
                   JOptionPane.PLAIN_MESSAGE,
                   null, new String[0], null
              System.exit(0);
         public static void main(String[] argv) {
              new FilteredTree();

  • Create a tree node and show the report on the same page

    Hi,
    I have created a tree for our organization and each node represents a unit. The top one is office level and followed by division and brach.
    I have created a reprot on the same page as the tree node.
    What I want to do is:
    I would like to click a specific node and the report shows only that node and bellow. So, If I click division A and division A has two branch. my report shows only those two braches that bellong to division A.
    Can someone help me?
    Thank you

    The only way it could work is using iframes. Now OBIEE 11g would not allow iframes inside it's dashboard. It offers a dashboard object called "Embedded content" which is a restricted iframe kinda thing but unless you get this object's id from generated HTML you can change it's content dynamically. Besides, such an implementation may break with next patch. So here is an idea.
    Create a HTML page with two iframes, left one will hold all the reports with links (you can always generate a list of reports through catalog manager, open it in excel and make HTML links from it) that open report urls (in the format of ./saw.dll?GO&Path=....) in right iframe (using javascript open.window method). Once that page is working, call this page from dashboard using an action link. This is slightly twisted approach but at least it would give you what you asked for.
    About making the report list dynamic, I am afraid there are no easy answers. OBIEE provides web service that will allow the users to query catalog to get a list of reports. You can try some basic JSP to access the web service and generate the list dynamically. But that is not something I can provide here.

  • How to find the coordinates of a mouse click in a Tree node ?

    Hello
    I have a JTree that have few nodes. The nodes contain an icon and a label (using custom cell renderer) and I want to receive right clicks on the icon and show a popup menu.
    The problem is I can only get the right click on the whole tree node, not only the icon.
    I tried two approaches:
    1. register the mouse listener directly with the icon in the cell renderer. That doesnt work since the events received by the tree node do not propagate to its sub-components.
    2. Register the event with the JTree itself and then try to find which part of the tree node was clicked (see if it was within the coordinates of the icon).
    But I cant get the node's coordinates or width.
    I tried using SwingUtilities.convertPoint or SwingUtilities.ConvertMouseEvent but it just doesnt work with DefaultMutableTreeNode.
    Any ideas how to do it ?

    user11973359 wrote:
    1. register the mouse listener directly with the icon in the cell renderer. That doesnt work since the events received by the tree node do not propagate to its sub-components.No, it doesn't work because a renderer isn't added to any component hierarchy. It isn't in any way a 'sub-component'.
    Read about editor and renderer concepts in the Oracle tutorial on How to Use Tables.
    user11973359 wrote:
    2. Register the event with the JTree itself and then try to find which part of the tree node was clicked (see if it was within the coordinates of the icon).
    But I cant get the node's coordinates or width.<tt>getPathForLocation(...) </tt>in conjunction with<tt> getPathBounds(...)</tt>.
    db

  • Tree node to respond to the drag and drop...

    I have to be able to drag a file into a tree node to drop.
    When I drop at the tree node, the file should be shown at the right side of panel. Just like MS Window Explorer.
    Drag and drop at the table to table is working but not drag into the tree and automatically moves into the tree... is...
    Any idea would be welcomded.

    You'll need to setDragEnabled and write a TransferHandler for the JTree. See Introduction to Drag and Drop and Data Transfer.

  • How to directly change the text of a tree node once its in the tree

    How can I directly change the text of a tree node once its in the tree.
    I have a property box which fires an eventevery time it is edited
    (this is currently just output to the screen via println)
    What i want is for the tree node to take the updated text that is in the text box every time
    thus giving tree labels that update as you type
    PS. i have access to the tree node (DefaultMutableTreeNode) from the code that hanldes
    the text box event

    ... use the setUserObject() method of your DefaultMutableTreeNode, that'll set the text of the node.
    however, you probably need to do a treeModel.nodeChanged(node) with your tree model, to get the display updated.
    thomas

  • 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 alter the alv tree node text?

    hi
      i want to alter the alv tree node text, many people say it cann't be changed, but
    i look into the sample code 'BCALV_TREE_04', the average funtion(select a column and then select average function in the tool bar) can alter the tree node text dynamically.
      i try to look into the source code, the it's the sap standard code, all the funtions that user input, it goes to the statement "  CALL METHOD cl_gui_cfw=>dispatch.", and i don't understand what this statement do, can someone helps me?

    hi
    good
    The ALV tree report produces uses OBJECT METHOD functionality in-order to produce a
    tree structured ALV output. 
    The creation of an ALVtree report first requires the creation of a simple program to build the ALV
    details such as the fieldcatalog and to call a screen which will be used to display the ALVTree.
    The screen should be created with a 'custom control' where you wish the ALVtree report to appear.
    For the following example it will have the name 'SCREEN_CONTAINER'.
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
    reward point if helpful.
    thanks
    mrutyun^

Maybe you are looking for

  • How to Change delivery date of Purchase Requisition created from PM  module

    Hi all,      We are creating service PR from PM module. There is a need that user should be able to change the Delivery Date of the PR. When we use ME52N , the field is grayed out. If the PR is created with same data manually with ME51N, we are able

  • Use of  icloud

    what is use of icloud in macpro. how i can use icloud for benifit.

  • Upgrading using expdp and impdp

    I am upgrading from 10.2 to 11.1 by creating a new 11.1 db and then expdp from the 10.2 db and impdp to the 11.1 db. There is Oracle text installed and in use in the 10g db. Should I install the Oracle text in the 11.1 db first before I do a full imp

  • Why can't I order prints anymore through iPhoto?

    for years now i have ordered 4x6 photos for my albums at home. i just tried to order quite a few and noticed that under "share" the "order print" button is gone. What happened to it? and will it be coming back?

  • Unable to get the customer profile in CSC .

    Hi Guys, I'm unable to get the selected customer profile in CSC when i make an AJAX call to some jsp. Thanks, Ayan