Collapsable Tree in TableView

Hello,
is there any possibility to make a htmlb TableView that has some "+"-Signs that open/close new lines in the actual TableView?
For example if you have a list of purchase orders in an tableView and want to view the purchase positions of the order. Is it possible to click on an order and then open the posisitions right under the order in the tableView? It's like a integrated tree in an tableView!
Quit complex request, isnt it?
The following thread comes quit close to the request, but doesnt solve the issue completely.
tree functionality in htmlb:tableView
Thanks and regards
Markus Armbruster

<i>Do you know the ALV in an standard ABAP Report, that has on the left side a tree and on the right side the table. Each time you collapse/open a treenode, the table on the right is also updated.</i>
There is nothing available out of box..But you can achieve them by using Tableview & Tree.
Left hand side of the view/Page, you need to develop the Tree and Rite hand side you need to have Tableview (Tableview will give some of ALV functionality like sorting, filltering etc..)
Hope this will help you..
<i>*Reward each helpful answer</i>
Raja T

Similar Messages

  • 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

  • Expand/ Collapse tree funtion does not exist in new appraisals

    Hi all,
    I have been implementing the new objective setting and appraisals system and the old function of expand and collapse tree does not appear in the screen. this function was very useful because it is more user friendly.
    Is it somewhere in configuration or this feature does not exist in the mewer version??
    Should I open a sap message?
    thank you

    Hi
    Wat is the update?
    Thanks
    Sivab

  • Tree In TableView Using Iterator

    Can I creat a Tree in a TableView using Iterator( Which is implemented as a local class in a Model Class)

    Hi Manish,
    Your question is not that clear. Can you explain more?

  • Collapse Tree on 2nd level in 6i

    i have a tree which populates with below code on button click
    DECLARE
    my_tree ITEM;
    my_num  NUMBER;
    node    number;
    state   number;
    BEGIN
    --Set Tree--
    my_tree := Find_Item('BLOCK12.TREE9');
    my_num  := POPULATE_GROUP('record_group8');
    FTREE.SET_TREE_PROPERTY(my_tree, FTREE.RECORD_GROUP, 'record_group8');
    node    := Ftree.Find_Tree_Node(my_tree, '');
                        -- Collapse all --
                        WHILE NOT ftree.ID_NULL(node) LOOP
                        state := Ftree.Get_Tree_Node_Property(my_tree, node, Ftree.NODE_STATE);
                                   IF state = Ftree.EXPANDED_NODE THEN
                        Ftree.Set_Tree_Node_Property(my_tree, node, Ftree.NODE_STATE, Ftree.COLLAPSED_NODE);
                        END IF;
                        node := Ftree.Find_Tree_Node(my_tree, '', Ftree.FIND_NEXT,Ftree.NODE_LABEL, '', node);
                        END LOOP; 
    END;the node's are collopsed on the fitst level as
    -NODE0i need to keep the collopse to the 2nd level of the tree
    -NODE0
    --NODE1
    --NODE2
    --NODE3

    well this is little tricky i was unable to find some solution for it myself so i made a custom procedure to solve it...
    This code might gives u some idea .....i modified it for ur understanding..
    Declare
      htree item;
    node ftree.node;
    state number;
    from_state ftree.node;
    to_state ftree.node;
    counter number := 0;
      node_depth number;
    BEGIN
         from_state := ftree.EXPANDED_NODE;
         to_state   := ftree.COLLAPSED_NODE;
       -- Find the tree itself.
       htree := Find_Item('tree_block.menu_tree');
        --Collapsing all nodes
       for x in(select menu_no, order_no, master_menu_no, menu_file_name, menu_desc_en
                          from TableName
                       order by menu_no, order_no)
         loop
         node := Ftree.Find_Tree_Node(htree, x.menu_no, Ftree.FIND_NEXT, upper(Ftree.NODE_VALUE), ftree.root_node, ftree.root_node);
         state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
         IF state = from_state THEN
           Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, to_state);
         END IF;
      end loop;
    END;Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • Collapsing tree

    Hi,
    Why when I add a node - the whole tree collapses back to the first level? how can I prevent it?

    Hi,
    Why when I add a node - the whole tree collapses back to the first level? how can I prevent it?

  • Vertical scroll up/down when expand or collapse tree items

    Hi everyone, I'm newbie in adobe flex. Is it possible to makes vertical scroll position automatically scroll up and down when tree component expand/collapse?
    I would like to make automatically scroll position likes in tree of windows explorer. Any idea to makes it work?
    Regards,
    Gus Leo

    Yeah!!!after trial and error with this issue i find some logic to makes vertical scroll down automatically likes windos explorer.
    I'm attach some code with about this issue and hopes this will be useful for other developer.
    Put the code on ItemOpen on tree component
    private function onItemOpen(event:TreeEvent):void{
                   //rowHeight is default height of tree and +2 is my own logic, because they have a space between a tree
                        var _rowHeight:int = int(event.currentTarget.rowHeight) + 2;
                        var posX:int = int(event.currentTarget.mouseY);
                        var _maxHeight:int = myTree.height;
                        var itemCount:int = int(event.item.children.length);
                        //cheking the current position and calculation of droping index
                        if (((itemCount*_rowHeight) + posX) > _maxHeight){
                            var _currpos:int = posX + _rowHeight;
                            var _heightCount:int = _rowHeight;//default height count is the _rowHeight
                            for (var i:int = 0;i<itemCount;i++){
                                _currpos = _currpos + _rowHeight;
                                _heightCount = _heightCount + _rowHeight;
                                //if the the count of height itemschild > than the tree height so stop to add scrollposition
                                if (_maxHeight < _heightCount ){
                                    break;
                                }else if (_maxHeight < _currpos){
                                    myTree.verticalScrollPosition = myTree.verticalScrollPosition + 1;
    Message was edited by: Gus Leo

  • Creating expand/collapse trees in Pages

    I'd like to make a list where it's possible to expand or collapse parts of the list. I envision it using the arrows that point down to reveal the expanded list or right to collapse the list and when you click on the arrow it swaps between the two. Is this possible in Pages, or is there another application I should be using. I can't seem to figure out how to do it.
    Thanks,
    Nate
    Message was edited by: sdoigsd

    Hello,
    Omni Outliner does perfectly what You want.
    http://www.omnigroup.com/applications/omnioutliner/

  • Collapse Filter in TableView.

    Hi Gurus,
    I have designed a Table view iterator whose output contains list of  products and its description. I have set the Filter options so that the user can filter his options by entering the wildcard entries in the blank row which comes automatically below the header line.
    I would like to make this blank row visible at runtime whenever the user wants to enter the filter values.(It should be in collapsed state or minimized if user does not need it) Just want to know if it is possible to do it and how.
    Thanks.

    Hi Hasmath,
    as far as I know, there is no standard parameter to get that. The filter row is either visible or not visible (if filtering is not permitted for the table).
    But writing some small Javascript code to achieve this should not be too hard. Placing the link for triggering the change (e.g. the JavaScript) might be a little bit harder though.
    Best regards,
    Alexander

  • Tree component bug (?) and some questions

    Hi! I have some problems and questions about tree component.
    Problems:
    1. I have an expanded tree with ~300 items. Each item label
    displayed in 2-3 strings. After QUICK tree scrolling using mouse
    wheel (I make 3-5 scrolls) for most of items displayed only last
    string and one empty string :(
    Bug of tree renderer? Is it fixable?
    Questions:
    1. Can I have font color X for tree item 1 and font color Y
    for tree item 2?
    2. I have a tree with ~300 items. Expand/Collapse tree
    operations takes 5 to 10 seconds on Core2Duo. Is it possible to
    speed up this operations?
    Code:

    Hello.
    About problem 1.
    I faced this problem several times, cann't understand the
    problem. May be it's a bug.
    Questions.
    1. Of course you can. Write itemRenderer for this.
    2. Tree has effects for expanding and collapse events, you
    can reduce times for them.

  • JTree remove expand/collapse cross button...??

    Hi all,
    I have forbidden tree collapsing (by default it is fully expanded),
    and I want to remove expand/collapse cross buttons that actually are used to expand/collapse tree nodes.
    Is it possible and can anyone give me advice how i can do this.
    Thanks in advance.

    I tried extending the BasicTreeUI to return nulls for the collapsed and exapnded icons as shown in the code below. For the most part, it works great! However, one can still expand/collapse the tree by clicking on the point where the vertical and horizontal lines connect.
    I guess some one else will take over from here.
    import java.awt.BorderLayout;
    import javax.swing.Icon;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.WindowConstants;
    import javax.swing.plaf.basic.BasicTreeUI;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Temp extends JFrame {
         private JTree tree = null;
         public Temp() {
              super("Test");
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              initComponents();
              pack();
              setVisible(true);
         private void initComponents() {
              DefaultMutableTreeNode rootNode =
                   new DefaultMutableTreeNode("User Preferences", true);
              DefaultMutableTreeNode connectionSettingsNode =
                   new DefaultMutableTreeNode("Connection Settings", true);
              DefaultMutableTreeNode sslNode =
                   new DefaultMutableTreeNode("SSL", false);
              DefaultMutableTreeNode firewallNode =
                   new DefaultMutableTreeNode("Firewall", false);
              DefaultMutableTreeNode securityNode =
                   new DefaultMutableTreeNode("Security", true);
              DefaultMutableTreeNode serverCertificatesNode =
                   new DefaultMutableTreeNode("Server Certificates", false);
              DefaultMutableTreeNode clientCertificatesNode =
                   new DefaultMutableTreeNode("Client Certificates", false);
              connectionSettingsNode.add(sslNode);
              connectionSettingsNode.add(firewallNode);
              securityNode.add(serverCertificatesNode);
              securityNode.add(clientCertificatesNode);
              rootNode.add(connectionSettingsNode);
              rootNode.add(securityNode);
              tree = new JTree(rootNode);
              JScrollPane scroller = new JScrollPane(tree);
              getContentPane().add(scroller, BorderLayout.CENTER);
              tree.setUI(new MyTreeUI());
              //tree.setShowsRootHandles(false);
         public static void main(String args []) {
              new Temp();
         class MyTreeUI extends BasicTreeUI {
              public Icon getCollapsedIcon() {
                   return null;
              public Icon getExpandedIcon() {
                   return null;
    }Sai Pullabhotla

  • Tree Menu creation

    Created a tree menu off of a table and chose 'tree with icons'.
    How can you assign different icons to the tree branches?

    If your question was how to use an HTML DB tree control based on a SQL Query:
    Each tree in HTML DB has a template. HTML DB ships a few tree templates; but you can make your own. These templates control all images and icons used to exand and collapse tree nodes.
    If you want to have icons at the end of your tree branches; like a (+) or something; you can use the #A1#, #A2# controls: for example:
    select "EMPNO" id,
    "MGR" pid,
    "ENAME" name,
    null link,
    'yahoo' a1,
    null a2
    from "#OWNER#"."EMP"
    You can use the template to control the display. You can hard code the image names in your query if you want to use a decode to determine the value.
    Hope this helps.
    Mike

  • Tree Nodes has White Outline/Border

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

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

  • Setting a single tree node row height?

    Is there any way within my treecelleditor to set the row height of a single node, the one being edited, to a larger height, then when editing is done, set it back to normal? Or does the whole tree have to have every row height changed? I want to provide a 2 row editor when a user edits the node.

    Hello Ken,
    Use fire-bug and see what classes APEX is using to toggle tree nodes (to expand and collapse). Generally, the class "open" is used to Open/Expand and class "closed" is used to Collapse tree node.
    Now, if you can determine, which list id from which you need to expand the tree, depending on the page you are, then you can open all child nodes under it using following JS.
    /* Assuming P1_LIST_ID has the ID of List item from where you want to open all child nodes*/
    $("li#"+$("#P1_LIST_ID").val()).find("li").removeClass("closed").addClass("open");You can put the code under "execute when page load" section of your page.
    Regards,
    Hari

  • Tree in awt

    Hi
    I wanted to use awt and there are 2 major features that i am looking for. Is it possible for me to implement those in awt and if yes can i get some examples on them
    1) I need a collapsable tree structure on left pane - Do we have this tree component.
    2) Is there a browser control that i can plugin. Or is there is facilty that i can plugin browser control that opens pdf. I need to open pdf in that ?
    thanks

    I'm afraid the answer are:
    -No
    -No
    But you can do that with swing...

Maybe you are looking for