Spaning Tree and StackPort Bloking

Hello
i have this issue:
On Switch Stack of six switch C2960X Spaning tree showme this errors:
    with inconsistent peer vlan id 27 on StackPort2 VLAN25. (Stack6-2)
Oct 21 15:22:57.160: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0027. Port consistency restored. (Stack6-3)
Oct 21 15:22:57.824: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort3 on VLAN0035. Inconsistent peer vlan. (Stack6-3)
Oct 21 15:22:58.258: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 30 on StackPort3 VLAN29. (Stack6-3)
Oct 21 15:22:58.258: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort3 on VLAN0029. Inconsistent local vlan. (Stack6-3)
Oct 21 15:22:59.177: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0034. Port consistency restored. (Stack6-3)
Oct 21 15:23:05.741: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsisten
Stack6>t peer vlan id 203 on StackPort3 VLAN34. (Stack6-3)
Oct 21 15:23:05.741: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort3 on VLAN0203. Inconsistent peer vlan. (Stack6-3)
Oct 21 15:23:05.741: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort3 on VLAN0034. Inconsistent local vlan. (Stack6-3)
Oct 21 15:23:08.121: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0025. Port consistency restored. (Stack6-3)
Oct 21 15:23:08.121: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0013. Port consistency restored. (Stack6-3)
Oct 21 15:23:59.687: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort1 on VLAN0038. Inconsistent local vlan. (Stack6-1)
Oct 21 15:24:01.242: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0028. Port consistency restored. (Stack6-1)
Oct 21 15:24:01.256: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0026. Port consistency restored. (Stack6-1)
Oct 21 15:24:01.522: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 31 on StackPort1 VLAN37. (Stack6-1)
Oct 21 15:24:01.522: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort1 on VLAN0037. Inconsistent local vlan. (Stack6-1)
Oct 21 15:24:01.976: %SPANTREE-2-BLOCK_PVI
Oct 21 15:28:41.348: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort2 on VLAN0025. Inconsistent local vlan. (Stack6-2)
Oct 21 15:28:43.487: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort2 on VLAN0026. Inconsistent peer vlan. (Stack6-2)
Oct 21 15:28:47.444: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort2 on VLAN0037. Port consistency restored. (Stack6-2)
Oct 21 15:28:54.169: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort2 on VLAN0031. Port consistency restored. (Stack6-2)
Oct 21 15:28:55.738: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort2 on VLAN0013. Port consistency restored. (Stack6-2)
Oct 21 15:23:12.183: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 38 on StackPort3 VLAN25. (Stack6-3)
Oct 21 15:23:12.183: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort3 on VLAN0025. Inconsistent local vlan. (Stack6-3)
Oct 21 15:23:12.462: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0032. Port consistency restored. (Stack6-3)
Oct 21 15:23:15.003: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0012. Port consistency restored. (Stack6-3)
Oct 21 15:23:20.145: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 203 on StackPort3 VLAN27. (Stack6-3)
Oct 21 15:24:06.995: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0010. Port consistency restored. (Stack6-1)
Oct 21 15:24:09.701: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0034. Port consistency restored. (Stack6-1)
Oct 21 15:24:09.701: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0033. Port consistency restored. (Stack6-1)
Oct 21 15:24:13.958: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort1 on VLAN0010. Inconsistent peer vlan. (Stack6-1)
Oct 21 15:24:15.059: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0035. Port consistency restored. (Stack6-1)
Oct 21 15:28:59.216: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort2 on VLAN0033. Port consistency restored. (Stack6-2)
Oct 21 15:28:59.807: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 13 on StackPort2 VLAN203. (Stack6-2)
Oct 21 15:28:59.807: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort2 on VLAN0013. Inconsistent peer vlan. (Stack6-2)
Oct 21 15:28:59.807: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort2 on VLAN0203. Inconsistent local vlan. (Stack6-2)
Oct 21 15:29:00.209: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 38 on StackPort2 VLAN31. (Stack6-2)
Oct 21 15:29:00.209: %SPANTREE-2-BLOCK_PVI
Oct 21 15:23:20.145: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort3 on VLAN0027. Inconsistent local vlan. (Stack6-3)
Oct 21 15:23:20.218: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0030. Port consistency restored. (Stack6-3)
Oct 21 15:23:22.861: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0026. Port consistency restored. (Stack6-3)
Oct 21 15:23:23.147: %SPANTREE-2-RECV_BAD_TLV: Received SSTP BPDU with bad TLV on StackPort3 VLAN11. (Stack6-3)
Oct 21 15:23:24.500: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0016. Port consistency restored. (Stack6-3)
Oct 21 15:23:24.843: %SPANTREE-2-BLOCK_PVID_PEER: B
Oct 21 15:23:25.161: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 203 on StackPort3 VLAN13. (Stack6-3)
Oct 21 15:23:25.161: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort3 on VLAN0013. Inconsistent local vlan. (Stack6-3)
Oct 21 15:23:26.859: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0035. Port consistency restored. (Stack6-3)
Oct 21 15:23:27.282: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort3 on VLAN0029. Port consistency restored. (Stack6-3)
Oct 21 15:23:27.859: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 203 on StackPort3 VLAN35. (Stack6-3)
Oct 21 15:24:16.740: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 32 on StackPort1 VLAN33. (Stack6-1)
Oct 21 15:24:16.740: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort1 on VLAN0032. Inconsistent peer vlan. (Stack6-1)
Oct 21 15:24:16.740: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort1 on VLAN0033. Inconsistent local vlan. (Stack6-1)
Oct 21 15:24:16.751: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort1 on VLAN0034. Inconsistent peer vlan. (Stack6-1)
Oct 21 15:24:16.978: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0030. Port consistency restored. (Stack6-1)
Oct 21 15:24:26.502: %SPANTREE-2-RECV_PVID_ERR: Receiv
Oct 21 15:24:26.502: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort1 on VLAN0028. Inconsistent peer vlan. (Stack6-1)
Oct 21 15:24:26.502: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort1 on VLAN0011. Inconsistent local vlan. (Stack6-1)
Oct 21 15:24:26.712: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0038. Port consistency restored. (Stack6-1)
Oct 21 15:24:28.960: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0010. Port consistency restored. (Stack6-1)
Oct 21 15:24:28.960: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort1 on VLAN0026. Port consistency restored. (Stack6-1)
Oct 21 15:29:00.230: %SPANTREE-2-BLOCK_PVID_PEER: Blocking StackPort2 on VLAN0033. Inconsistent peer vlan. (Stack6-2)
Oct 21 15:29:07.517: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort2 on VLAN0030. Port consistency restored. (Stack6-2)
Oct 21 15:29:07.591: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 31 on StackPort2 VLAN37. (Stack6-2)
Oct 21 15:29:07.591: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking StackPort2 on VLAN0037. Inconsistent local vlan. (Stack6-2)
Oct 21 15:29:09.527: %SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking StackPort2
Of course, i lost stack connection
Regards

Duplicate post.
Go HERE.

Similar Messages

  • Problem with trees and memory handling.

    Hi there, I just want to know if, when I create a large binary tree, and I re-"pointed" the root pointer to another node somewhere below in that same tree (say, a terminal node), will the "upper" parts of the tree (starting from the new root node) be removed/deleted from memory? Please explain your answers.
    Thank you.

    f I changed the root to B, will A and its children be
    deleted from memory?If you do root = B, AND if nothing else is referring to A or C or anything else beneath them, then A, C, and all of C's children will become eligible for garbage collection.
    Whether the memory actually gets cleaned up is something you can't really predict or control, but it doesn't really matter. If it's needed, it will get cleaned up. If it's not needed, it may or may not get cleaned up, but your program won't care.
    So, in short, yes, for all intents and purposes, A's, C's, and C's descendants' memory is released when you re-root to B.

  • Spanning Tree and Admin mac address issues srw2048

    Ok, I have a somewhat complex problem and hopefully someone may shed some light or have an idea as to whats wrong.
    First the scenario:
    I have two Cisco Cat 6509's etherchanneled to each other via two fiber cables.  One of these is the STP/RSTP root.  I have two SRW2048's.. one trunked to each of these 6509 switches.  There is also a trunk between the SRW2048's.  All this is to create a redundant topology so that if one of the switches fail's the others can still forward packets to each other.  Of course the scenario described is in fact a loop that should be handled by STP/RSTP.  I have RSTP enabled on all the switches in the scenario (PV RSTP on the cisco switches as they only do Cisco's brand of per vlan spanning tree).  There are 3 vlan's configured on each of the srw2048's (2,55,96).  There are corresponding vlan's also on the 6509's.  I have put the srw2048's management interface into vlan 2.
    The problem:
    I need to forward packets between the srw2048's primarily and only use the 6509 that is not the root when a failure happens.  I have configured the non-root 6509's spanning tree cost on the etherchannel to be higher then the alternate path through the srw's to the root.  I can hook everything up and view the spanning tree and see that the srw2048's interface that goes to the non-root 6509 is blocked, and all other interfaces on the other switches are forwarding.  I can in fact ping and get to the admin interface on all the switches.  Then for some strange reason the admin interface of the srw2048 plugged into the non-root 6509 stops responding.  If I disable either the interface its plugged into on the 6509 or the other srw2048 everything starts working again.  Sometimes it responds after many failures for no apparent reason.  I looked into the mac-address table on the 6509's and they are conflicting, pointing to each other for the mac-address of the broken srw2048.  When I clear the mac-table the admin port comes back for about 5 seconds then again goes dark.  When reviewing mac-table on the 6509's they are back to pointing to each other.  The odd thing (although I haven't confirmed this completely) is that hosts placed into vlan 2 on that same srw2048 seem to work fine.  If there was an STP loop or something misconfigured, I would expect it to effect any host in vlan 2 or the other vlan's for that matter on the srw2048 that stops responding.  Alas, I am stuck because I need to manage this switch remotely.  My only thought is that for some reason even when the STP status is blocked the broken srw2048 is still sending out arp's of its admin interface and bypassing the STP protocol.  I have no way to confirm this, but maybe someone has an idea as to what I'm doing wrong, or otherwise offer a solution.  For now, I simply removed vlan 2 from the 6509 that the broken srw2048 is plugged into and everything seems fine.
    My apologies for such a long post, but this is somewhat complicated.  Thanks in advance for any info.
    -Geoff
    Message Edited by gmyers on 08-19-2008 10:35 PM

    To follow up, I had a ticket open with Linksys about this for about 3 months with no resolution.  I submitted packet captures, stp outputs, etc and no luck.  I gave up and basically had to revert to a manual failover for redundancy.  It's no perfect or fast, but it works every time.
    Unless linksys issues a firmware upgrade with this as a fix, I doubt we will be able to ever resolve this on our own.

  • Report with ALV tree and ALV list?

    I need to create a report with layout as same as this one
    [http://trangiegie.com/MyFile/output.JPG]
    It looks like a report with combination of ALV tree and list. The tree works like a navigation bar. Wonder if there are any demo programs like this. Will appreciate any help.

    For Tree alone - You can check program : BCALV_TREE_02
    Program Name                   Report title
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    BCALV_TEST_SIMPLE_TREE         Program BCALV_TEST_SIMPLE_TREE
    BCALV_TREE_01                  ALV Tree Control: Build Up the Hierarchy Tree
    BCALV_TREE_02                  ALV Tree Control: Event Handling
    BCALV_TREE_03                  ALV Tree Control: Use an Own Context Menu
    BCALV_TREE_04                  ALV Tree Control: Add a Button to the Toolbar
    BCALV_TREE_05                  ALV Tree Control: Add a Menu to the Toolbar
    BCALV_TREE_06                  ALV tree control: Icon column and icon for nodes/items
    BCALV_TREE_DEMO                Demo for ALV tree control
    BCALV_TREE_DND                 ALV tree control: Drag & Drop within a hierarchy tree
    BCALV_TREE_DND_MULTIPLE        ALV tree control: Drag & Drop within a hierarchy tree
    BCALV_TREE_EVENT_RECEIVER      Include BCALV_TREE_EVENT_RECEIVER
    BCALV_TREE_EVENT_RECEIVER01
    BCALV_TREE_ITEMLAYOUT          ALV Tree: Change Item Layouts at Runtime
    BCALV_TREE_MOVE_NODE_TEST      Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO         Program BCALV_TREE_SIMPLE_DEMO
    BCALV_TREE_VERIFY              Verifier for ALV Tree and Simple ALV Tree

  • Dynamic Tree and TreeNode Issue

    I am using JSC2 (060120) on Win2K pro, exporting the WAR and running in JBoss 4.0.3 running under JDK 1.5.0_04.
    I am trying to dynamically build a tree as the user clicks on nodes and am not having success following the example at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sitemaptree.html
    When I attempt to add the child nodes directly to nodes via clickedNode.getChildren().add(myNewNode); I get an error as follows:
    10:17:29,260 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    javax.faces.el.ReferenceSyntaxException: AP-1030Child.id
    at com.sun.faces.application.ApplicationImpl.checkSyntax(ApplicationImpl.java:749)
    at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:291)
    The ID shown AP-1030Child.id does not exist, my to be parent node is named AP-1030 and my to be child is named AP-1030-Bottom.
    The only way I can get the Tree to build properly is to add the to be child (AP-1030-Bottom) to the Tree itself and then assign it's parent as the node (AP-1030). But, the problem I run into then is the next time the parent node (AP-1030) is clicked parent.getChildCount() or parent.getChildren().size() both evaluate to zero and I attempt to build the children for the node at which point the code blows up due to duplicate naming.
    Has anyone else experienced this? Am I doing something wrong?
    Here is the code I use to build my tree initially on the SessionBean...
    for(int i = 0; i < count; i++)
    TreeNode newNode = new TreeNode();
    newNode.setId("AP-" + pages.pageId);
    newNode.setText(pages[i].page);
    newNode.setImageURL("/resources/tree_document.gif");
    MethodBinding nodeMethodBinding = this.getApplication().createMethodBinding("#{MainPage.treeNode_action}", null);
    newNode.setAction(nodeMethodBinding);
    this.applicationPagesTree.getChildren().add(newNode);
    Here is the code I am using to add the child nodes to the clicked node...
         for(int l = 0; l < locationsCount; l++) {                               
              TreeNode locationNode = new TreeNode();
    String sectionText = "";
              (populate sectionText with Top|Left|Center|Right|Bottom based on data)
              locationNode.setText(sectionText);
              // making unique name for this object in the tree: parentname + section
    locationNode.setId(searchID + "-" + sectionText);
    locationNode.setImageURL("/resources/tree_document.gif");
              // bind to method for the page sections click
    MethodBinding nodeMethodBinding = this.getApplication().createMethodBinding("#{MainPage.locationNode_action}", null);           locationNode.setAction(nodeMethodBinding);
              // adding to the base tree object after the parent (why can I just not add to the node?)
              this.treeList.getChildren().add(insertIndex + l, locationNode);
              // this nudges the node over one, otherwise it is peer to the parent (again, why not just add to the parent?)
    locationNode.setParent(node);
    Why is it I can get the String ID from the tree and not the object? Wouldn't it make sense to give me the TreeNode instead of it's ID when calling getCookieSelectedTreeNode()? This would seem a more proper object orientated approach.
    Any help appreciated, thanks.

    Thanks,
    I have tried pretty much that exact same code and it does not work for some reason. That code is the same as the example I showed that I followed originally.
    The only way I can get it to work is as I showed. When I do the node creation and then add to the node in the tree it blows up while rendering with the message from the original post.

  • Tree and Tree Node Components - Threadinar7

    Hi All,
    This is the seventh in the "Threadinar" series , please see Threadinar6 at
    http://forum.sun.com/jive/thread.jspa?threadID=100601 for details
    In this Threadinar we will focus on the
    "Tree" and "Tree Node" Components
    Let us begin our discussion with the Tree Component.
    Tree Component
    You can drag the Tree component from the Palette's Basic category to the Visual Designer to create a hierarchical tree structure with nodes that can be expanded and collapsed, like the nodes in the Outline window. When the user clicks a node, the row will be highlighted. A tree is often used as a navigation mechanism.
    A tree contains Tree Node components, which act like hyperlinks. You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page. You set Tree Node properties in the Tree Node Component Properties window.
    * If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages.
    * Events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    Initially when you drop a tree on a page, it has one root node labeled Tree and one subnode labeled Tree Node 1. You can add more nodes by dragging them to the tree and dropping them either on the root node to create top level nodes or on existing nodes to create subnodes of those nodes. You can also right-click the Tree or any Tree Node and choose Add Tree Node to add a subnode to the node.
    Additionally, you can work with the component in the Outline window, where the component and its child components are available as nodes. You can move a node from level to level easily in the Outline window, so you might want to work there if you are rearranging nodes. You can also add and delete tree nodes in the Outline window, just as in the Visual Designer.
    The Tree component has properties that, among other things, enable you change the root node's displayed text, change the appearance of the text, specify if expanding or collapsing a node requires a trip to the server, and specify whether node selection should automatically open or close the tree. To set the Tree's properties, select the Tree component in your page and use the Tree Component Properties window.
    The following Tutorial ("Using Tree Component") is very useful to learn using Tree components
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sitemaptree.html
    See Also the Technical Article - "Working with the Tree Component and Tree Node Actions"
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/tree_component.html
    Tree Node Component
    You can drag the Tree Node component from the Palette's Basic category to a Tree component or another tree node in the Visual Designer to create a node in a hierarchical tree structure, similar to the tree you see in the Outline window.
    The tree node is created as a subnode of the node on which you drop it. If you drop the node on the tree component itself, a new node is created as a child of the root node. You can see the hierarchical structure clearly in the Outline window, where you can also easily move nodes around and reparent them.
    You can also add a tree node either to a Tree component or to a Tree Node component by right-clicking the component and choosing Add Tree Node.
    A Tree Node component by default is a container for an image and can be used to navigate to another page, submit the current page, or simply open or close the node if the node has child nodes.
    * If you select the Tree Node component's node Tree Node icon in the Outline window, you can edit its properties in the Tree Node Properties window. You can set things like whether or not the Tree Node is expanded by default, the tooltip for the Tree Node, the label for the tree node, and the Tree Node's identifier in your web application.
    * You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page.
    - Note: If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages. In addition, events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    * If you select the image in the Tree Node, you can see that its icon property is set to TREE_DOCUMENT. If you right-click the image on the page and choose Set Image, you can either change the icon to another one or choose your own image in the Image Customizer dialog box. For more information on working with an image in a tree node, see Image component.
    - Note: The image used in a tree node works best if it is 16x16 or smaller. Larger images can work, but might appear overlapped in the Visual Designer. You can right-click the component and choose Preview in Browser feature to check the appearance of the images.
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    One challenge I had experience was to make the tree
    always expanded on all pages (I placed my tree menu
    in a page fragment so I can just import it in my
    pages).Did you solve this problem. It would be interesting to know what you did.
    To expand a node you call setExpanded on the node. Here is some code from a tutorial that a coworker of mine is working on.
    In the prerender method:
           Integer expandedPersonId = getRequestBean1().getPersonId();
             // If expandedPersonId is null, then we are not coming back
            // from the Trip page. In that case we do not want any trip
            // nodes to be pre-selected (highlighted) due to browser cookies.
            if (expandedPersonId==null) {
                try {
                    HttpServletRequest req =(HttpServletRequest)
                    getExternalContext().getRequest();
                    Cookie[] cookies = req.getCookies();
                    //Check if cookies are set
                    if (cookies != null) {
                        for (int loop =0; loop < cookies.length; loop++) {
                            if (cookies[loop].getName().equals
                                    ("form1:displayTree-hi")) {
                                cookies[loop].setMaxAge(0);
                                HttpServletResponse response =(HttpServletResponse)
                                getExternalContext().getResponse();
                                response.addCookie(cookies[loop]);
                } catch (Exception e) {
                    error("Failure trying to clear highlighting of selected node:" +
                            e.getMessage());
            }                  ... (in a loop for tree nodes)...
                      personNode.setExpanded(newPersonId.equals
                                    (expandedPersonId));In the action method for the nodes:
           // Get the client id of the currently selected tree node
            String clientId = displayTree.getCookieSelectedTreeNode();
            // Extract component id from the client id
            String nodeId = clientId.substring(clientId.lastIndexOf(":")+1);
            // Find the tree node component with the given id
            TreeNode selectedNode =
                    (TreeNode) this.getForm1().findComponentById(nodeId);
            try {
                // Node's id property is composed of "trip" plus the trip id
                // Extract the trip id and save it for the next page
                Integer tripId = Integer.valueOf(selectedNode.getId().substring(4));
                getRequestBean1().setTripId(tripId);
            } catch (Exception e) {
                error("Can't convert node id to Integer: " +
                        selectedNode.getId().substring(4));
                return null;
    It would also be great if I can set the tree
    readonly where the user cannot toggle the expand
    property of the tree (hope this can be added to the
    tree functionality).

  • Drag and drop in tree and grid

    Hi all, I have one question on dragging and dropping from grid to/from tree.
    In a screen I have one tree and one grid. The following operations need to be performed on this screen.
    1. Drag from grid and drop in tree.
    2. Drag from tree and drop in grid.
    3. Drag from tree and drop in tree itself.
    Actually we will add the flavors for every action. Here I am confused in how many flavors I need to take.
    What I am taking right now are:
    For tree: 3 seperate flavors.
    For Grid: 2 seperate flavors.
    Can you please advise me on this.
    Thanks and Regards,
    Balakrishna.N

    Hello,
    Try with this programs
    BCALV_TEST_GRID_DRAG_DROP
    BCALV_TEST_DRAG_DROP_02

  • What i use to develop complex tree and table in my web application?

    hi guys
    simply most of my work in my web application will be depend on:
    1-tree
    2-table
    i need this tree and table deal with database table (or even tables) must be able to do every thing like add node/row/column, delete, update, drag-n-drop, various object nodes/cells like check-box, list, images...etc
    i used JTree and JTable then stoped because i faced problems in dealing with applet/database, and i really didnt see this is perfect way to do that even i agree that JTree and JTable are excellent objects. i also start using ajax tree but i didnt see it robust to have all this complicated work with database.
    by the way i need also master-detail UI table, but its easy to get this if i have good and flexable table object.
    my rest pages developed by jsp, servlet, javascript, html...etc
    so any suggestion to how i build this tree and table? i also heared about JSF, is it serve me?
    thanks

    so if the only way to use JTree and JTable,There are other ways, but they're not Java and might be more complicated.
    are there
    any links you have discussing dealing database with
    applet by keep applet away from direct connection to
    my database?I'm not aware of links, but it's common sense. You don't want to expose the DB server to the internet, and instead contact a server for authentication that then forwards the request to the DB.

  • Tree and Table UI element with same data source (context)

    Hello,
    I am trying to build an application which shows an tree and an table UI which shows additional information to the selected tree node. (like Windows Explorer)
    I am using an context like this:
    Class - - - - - - - - --  (Mapped  value Node)
    - SubClass - - - - -  (Recursion Node)
    - id - - - - - - - - -- - -(Value attribute)
    - name - - - - - - - - -(Value attribute)
    For the tree I am unsing this event handler  
         public void onActionClassNodeSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, de.aequitas.sap.wd.java.easyclass.wdp.IPrivateEasyClassView.IClassElement element )
    wdModifyView contains this:
    public static void wdDoModifyView(IPrivateEasyClassView wdThis, IPrivateEasyClassView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
         IWDTable pictureTable = (IWDTable) view.getElement("PictureTable");
        if(firstTime)
             IWDTreeNodeType node = (IWDTreeNodeType) view.getElement("TreeNodeType");
             node.mappingOfOnLoadChildren().addSourceMapping("path", "element");
             node.mappingOfOnAction().addSourceMapping("path", "element");
    I think I could use now
    pictureTable.bindDataSource()
    , but do not know where to get the needed parameter.
    Thank You
    Bernd

    >
    Bernd Herbold wrote:
    > Hello,
    >
    > I am trying to build an application which shows an tree and an table UI which shows additional information to the selected tree node. (like Windows Explorer)
    >
    > I am using an context like this:
    > Class - - - - - - - - --  (Mapped  value Node)
    >  - SubClass - - - - -  (Recursion Node)
    >  - id - - - - - - - - -- - -(Value attribute)
    >  - name - - - - - - - - -(Value attribute)
    >  .
    >  .
    >  
    > For the tree I am unsing this event handler  
    >
         public void onActionClassNodeSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, de.aequitas.sap.wd.java.easyclass.wdp.IPrivateEasyClassView.IClassElement element )
    >  
    > wdModifyView contains this:
    >
    >  
    public static void wdDoModifyView(IPrivateEasyClassView wdThis, IPrivateEasyClassView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    >   {
    >     //@@begin wdDoModifyView
    >      IWDTable pictureTable = (IWDTable) view.getElement("PictureTable");
    >     if(firstTime)
    >     {
    >          IWDTreeNodeType node = (IWDTreeNodeType) view.getElement("TreeNodeType");
    >          node.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    >          node.mappingOfOnAction().addSourceMapping("path", "element");
    >     }
    >
    > I think I could use now
    pictureTable.bindDataSource()
    , but do not know where to get the needed parameter.
    >
    > Thank You
    > Bernd
    Hi,
    Following is the code to do this
    //Your existing code
    IWDTable pictureTable = (IWDTable) view.getElement("PictureTable");
    //use the following code for binding
    IWDNodeInfo nodeInfo = wdContext.nodeClass().getNodeInfo();// Assuming class Node is bound to table.
    pictureTable.bindDataSource(nodeInfo);
    Regards
    Ayyapparaj

  • How to next consecutive node in binary tree and insert in sql server

    i need to find next node in this tree and insert in sql server ...
    dilip kumar

    It depends you data structure. How do you store this tree structure in the database? What's the database design? BTW, you can see this article which include a related sample :
    Custom Sort in Acyclic Digraph
    T-SQL e-book by TechNet Wiki Community
    My Blog
    My Articles

  • Abap Objects generating List Trees and Grids

    Hi Friends,
      Please provide me the Information for how to work with ABAP OBJECTS creating(and manipulating)the combination of List Trees and Grids.
    Regards,
    Sowjanya

    There are a couple of examples programs,  You can start by checking out transaction DWDM for some of the basic ABAP oo controls.  You can also check out any program which begins with BCALV* for examlple of ALV grids, trees, and lists.
    REgards,
    Rich Heilman

  • Dynamic loading tree and data grid

    Hi All,
    I new to java as well as JSF. I am very impressed with the jsf and Sun Java Creator IDE. I made a sample project.
    Now I want to load tree and data grid with dynamic values how can I achieve this.
    Please help to find out some examples.
    Also I need to know who I can use SOAP call using JSF.
    Thanks
    CSCS

    To dynamically load a Basic Table (ui:table) from a database, see http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/databoundcomponents.html
    To dynamically load a Basic Table from other sources of data that are loaded into an array or such, see http://blogs.sun.com/roller/page/divas?entry=table_component_sample_project
    To dynamically CREATE a Basic Table, see http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/createTableDynamically.html and http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/add_component_to_table.html
    To dynamically create an HTML table on the fly, see section 7.5 in Chapter 7 of the Field Guide at http://developers.sun.com/prodtech/javatools/jscreator/learning/bookshelf/index.html
    To dynamically create a tree, see Dynamic Tree example at http://developers.sun.com/prodtech/javatools/jscreator/reference/index.jsp.
    A tutorial for dynamically creating a tree from a database is work in progress.
    Hope this helps,
    Chris

  • Major tree and display issue.........

    Hi guys! I am having a problem whereby when I click on a tree node(Folder), I want all the images contained in that folder to be displayed on a JPanel which I created. By the way, the tree and panel are added to a splitpane. Tree on the right, and panel on the left. I will really appreciate it if someone can assist. Thanks a lot in advance!!
    Cheers,
    Bolo

    Hi,
    You see this demo, it displays all the images of a selected folder in the tree in the right panel. You can customize the layout of the right panel to suit your need.
    Regards,
    Pratap
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.tree.*;
    public class Frame1 extends JFrame implements TreeSelectionListener {
         JSplitPane jSplitPane1 = new JSplitPane();
         JScrollPane jScrollPane1 = new JScrollPane();
         JScrollPane jScrollPane2 = new JScrollPane();
         JTree tree = new JTree();
         JPanel panel = new JPanel();
         String dir = "d://images/";
         private static final FileSystemView fsv = FileSystemView.getFileSystemView();
         FlowLayout flowLayout1 = new FlowLayout();
         public Frame1() {
              try {
                   jbInit();
                   tree.setModel(new FileTreeModel(dir));
                   tree.setCellRenderer(new FileCellRenderer());
                   tree.addTreeSelectionListener(this);
              catch(Exception e) {
                   e.printStackTrace();
         public void valueChanged(TreeSelectionEvent e) {
              panel.removeAll();
              if (e.getNewLeadSelectionPath() == null){
                   panel.repaint();
                   return;
              File node = (File)e.getNewLeadSelectionPath().getLastPathComponent();
              if (node.isFile()) {
                   panel.repaint();
                   return;
              File []images = node.listFiles();
              try {
                   for (int i = 0; i < images.length; i++) {
                        String name = images.getName();
                        boolean image = name.endsWith(".gif") || name.endsWith(".jpg") || name.endsWith(".png");
                        if (!image) continue;
                        ImageIcon icon = new ImageIcon(images[i].toURL());
                        panel.add(new JLabel(icon));
                   panel.revalidate();
              catch (Exception ex) {
                   ex.printStackTrace();
         public static void main(String[] args) {
              Frame1 f = new Frame1();
              f.setSize(400,300);
              f.setLocation(200,200);
              f.show();
         private void jbInit() throws Exception {
              panel.setBackground(Color.white);
              panel.setLayout(flowLayout1);
              flowLayout1.setAlignment(FlowLayout.LEFT);
              this.getContentPane().add(jSplitPane1, BorderLayout.CENTER);
              jSplitPane1.add(jScrollPane1, JSplitPane.LEFT);
              jScrollPane1.getViewport().add(tree, null);
              jSplitPane1.add(jScrollPane2, JSplitPane.RIGHT);
              jScrollPane2.getViewport().add(panel, null);
         public class FileTreeModel extends DefaultTreeModel {
              File root;
              FileTreeModel(String dir)     {
                   super(null);
                   root = new File(dir);
              public Object getChild(Object parent, int index){
                   File p = (File)parent;
                   return p.listFiles()[index];
              public int getChildCount(Object parent)     {
                   File p = (File)parent;
                   return p.listFiles().length;
              public int getIndexOfChild(Object parent, Object child)     {
                   File f [] = ((File)parent).listFiles();
                   for (int i = 0; i < f.length; i++) {
                        if (f[i] == child) return i;
                   return 0;
              public Object getRoot()     {
                   return root;
              public boolean isLeaf(Object node){
                   return ((File)node).isFile();
         public class FileCellRenderer extends DefaultTreeCellRenderer {
              public Component getTreeCellRendererComponent(JTree tree,
                                                           Object value,
                                                           boolean selected,
                                                           boolean expanded,
                                                           boolean leaf,
                                                           int row,
                                                           boolean hasFocus) {
                   super.getTreeCellRendererComponent(tree, value,selected, expanded, leaf, row, hasFocus);
                   File f = (File)value;
                   setIcon(fsv.getSystemIcon(f));
                   setText(f.getName());
                   return this;

  • Suffix Tree and similar

    Hi,
    I'm stuck with the app i'm writing and i really need some good ideas.
    The basic problem is:
    I generate a list of string, everytime i produce a new string i need to check if it is already present in the list, if not i add it to the list.
    Each string is ordered and the list is ordered only respect to the first char.
    To cope with that i used Tree structure similar to a Suffix Tree where i insert the string into the tree and it easily checks if the string is already present or not.
    The tree works well but with strings of length 7 or more the heap goes out of bound.
    Maybe i need a better implementation of the suffix tree,
    do you know any?
    or some other idea that requires lower space?
    Thanks in advance!

    Use a Hashset and not a list. It's exactly for that purpose.
    You can later still fill that Set into a List and use a Comparator for custom sorting.

  • Macking button to expand the tree and collapse tree and another to add node

    macking button to expand the tree and collapse tree and another to add node and saving the changes in the database ( this is problem)
    and finally delete node from database
    so what is proper code for those buttons
    thanks my mail is :
    [email protected]

    Hello,
    Use the ftree package's functions
    code to expand all nodes:
    PROCEDURE explose_tree IS
    node    ftree.node;
    htree   ITEM;
    state   varchar2(30);
    BEGIN
       -- search the tree ID --
       htree := Find_Item('BL_TREE.TREE_1');
        -- search the root --
           node  := Ftree.Find_Tree_Node(htree, '');
        -- expand all nodes --
       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;and to collapse all nodes:
    PROCEDURE Implose_tree IS
       node   ftree.node;
       htree  ITEM;
       state  varchar2(30);
    BEGIN
       -- search the root ID --
       htree := Find_Item('BL_TREE.TREE_1'); 
       -- search the root --
       node  := Ftree.Find_Tree_Node(htree, '');  
       -- Collapse all nodes --
       WHILE NOT ftree.ID_NULL(node) LOOP
         state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
         IF state = Ftree.EXPANDED_NODE THEN
          Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.COLLAPSED_NODE);
         END IF;
        node := Ftree.Find_Tree_Node(htree, '', Ftree.FIND_NEXT,Ftree.NODE_LABEL, '', node);
       END LOOP;
    END; Francois

Maybe you are looking for