How to collapse other expanded   item

Hi,
I have 5 department on a tree view datawindow   and each department consists of employee name. When I try to expand department 5  how to make
other departments  as collapsed if they have been already  isexpanded before. The users want to view the current item to be expanded state.
Please help
Pol

Please can you provide a  sample code for that.
//long l_grouplevel_old,li_row_old // //l_grouplevel_old = l_grouplevel //li_row_old = li_row //l_grouplevel = grouplevel //li_row =  row // // dw_1.Collapse(l_grouplevel_old,li_row_old) But it is not working

Similar Messages

  • How to collapse the expanded nodes programmatically?

    Hi,
    I am using Jdeveloper11.1.1.4
    Use Case:
    Level of the tree is 2; Like Root has Department and child has Employees
    Use Case:
    I have exapanded Department 10 root node and on click of Department 20 root node,
    the department 10 root node must collapse.
    How to achieve this?
    Thanks
    RajGopal K

    In order for all the nodes in a treetable to be expanded, you would need to add all the rows to the disclosedRowKeySet.
    1) Create a binding for the treetable in managed mean code as 'treeTable'.
    2) In actionListener for the commandButton, invoke the following method 'expandTreeTable':
        public void onExpandButtonClick(ActionEvent actionEvent)
            this.expandTreeTable();
        private RowKeySet disclosedTreeRowKeySet = new RowKeySetImpl();
        private void expandTreeTable()
            if (this.treeTable != null)
                disclosedTreeRowKeySet = new RowKeySetImpl();
                CollectionModel model = (CollectionModel) treeTable.getValue();
                JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) model.getWrappedData();
                JUCtrlHierNodeBinding rootNode = treeBinding.getRootNodeBinding();
                disclosedTreeRowKeySet = treeTable.getDisclosedRowKeys();
                if (disclosedTreeRowKeySet == null)
                    disclosedTreeRowKeySet = new RowKeySetImpl();
                List<JUCtrlHierNodeBinding> firstLevelChildren = rootNode.getChildren();
                for (JUCtrlHierNodeBinding node: firstLevelChildren)
                    ArrayList list = new ArrayList();
                    list.add(node.getRowKey());
                    disclosedTreeRowKeySet.add(list);
                    expandTreeChildrenNode(treeTable, node, list);
                treeTable.setDisclosedRowKeys(disclosedTreeRowKeySet);
        private void expandTreeChildrenNode(RichTreeTable rt, JUCtrlHierNodeBinding node,
                                            List<Key> parentRowKey)
            ArrayList children = node.getChildren();
            List<Key> rowKey;
            if (children != null)
                for (int i = 0; i < children.size(); i++)
                    rowKey = new ArrayList<Key>();
                    rowKey.addAll(parentRowKey);
                    rowKey.add(((JUCtrlHierNodeBinding) children.get(i)).getRowKey());
                    disclosedTreeRowKeySet.add(rowKey);
                    if (((JUCtrlHierNodeBinding) (children.get(i))).getChildren() == null)
                        continue;
                    expandTreeChildrenNode(rt, (JUCtrlHierNodeBinding) (node.getChildren().get(i)),
                                           rowKey);
        }Timo

  • Programmatically Collapse and Expand Trays in WDA View

    I have 2 trays in my ABAP Web Dynpro View.  First tray is a filter selection tray and the second tray is a content tray where I will display the results based on the filter criteria user selected in the first tray.  When the user clicks OK in the filter selection tray, I want to automatically collapse the tray to make more rooms for the content tray.  Does anyone know how to collapse and expand the tray programatically?
    Your help will be really appreciated.
    Thanks!
    Pat Hong

    I made it work by adding the following code in WDDOMODIFYVIEW method:
      DATA lr_tray TYPE REF TO cl_wd_tray.
      lr_tray ?= view->get_element( 'TRAY_NAME' ).
          CALL METHOD lr_tray->set_expanded
            EXPORTING
              value = abap_false.
    Pat

  • How to change the node's icon in a tree when the node collapse or expand?

    how to change the node's icon in a tree when the node collapse or expand?

    Hi,
    You may need to use custom skin for that.
    -Arun

  • How do I remove expand / collapse icon for JTree empty folders

    Hi
    I am using a JTree as a file system browser. I use DefaultMutableTreeNode nodes.
    I have a problem with empty folders.
    Empty folders show the expand / collapse icon, leading the user to believe there are sub-directories. When the user double-clicks the folder, the expand / collapse icon goes away. This is a "haha-gotcha" glitch that I really don't want my users to have to continually deal with.
    So, how might I get my JTree to not show the expand / collapse icon for empty folders?
    Thanks
    Wayne

    Maybe I can use the FileSystemView isTraversable(File f) method in my TreeCellRenderer class to check if anything is in the directory.
    But I still need to know how to disable the expand / collapse icon for such a node.

  • TreeView - Expand only selected node and collapse others

    Hi
    How I can expand only selected node and collapse other nodes that was expanded earlier?!

    Ghostenigma,
    switch Option Strict On. I've tried to analyze the code but it's not usable due to type ignorance.
    BTW, Goto is not required here. ELSEif means it's only executed if the previous expressions are not true.
    Armin
    Ignore other code and give an reply for what I've asked else you are not obligated to post a reply at all!
     I am not sure if you took the "type ignorance" part wrong but, Armin was only trying to give you helpful information which i would give too.  Option Strict is a GOOD thing to use and the GoTo statements are not needed inside your ElseIf
    statements.  As far as that goes, i would not recommend using GoTo in any modern .Net programming.
     Anyways, the problem is with the way you are Adding and Removing all the child nodes every time the nodes are DoubleClicked and when they are Collapsing.  I just simulated your code to add the sub nodes when a main node is double clicked. 
    You can just use the NodeMouseDoubleClick event instead of the TreeView`s DoubleClick event to make it a little easier on yourself too.
     This corrected the problem for me.
    Public Class Form1
    Private r As New Random ' this random class is only for my simulation of adding sub nodes (not needed)
    Private expanded As TreeNode
    Private Sub TreeView1_BeforeCollapse(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeCollapse
    e.Node.Nodes.Clear()
    End Sub
    Private Sub TreeView1_BeforeExpand(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) Handles TreeView1.BeforeExpand
    Dim pn As TreeNode = e.Node
    While pn.Parent IsNot Nothing
    pn = pn.Parent
    End While
    If expanded IsNot Nothing And expanded IsNot pn Then expanded.Collapse()
    expanded = pn
    End Sub
    Private Sub TreeView1_NodeMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseDoubleClick
    'Added this part to collapse the prior expanded node and set the (expanded) node to the new one
    If expanded IsNot Nothing And expanded IsNot e.Node Then
    expanded.Collapse()
    Dim pn As TreeNode = e.Node
    While pn.Parent IsNot Nothing
    pn = pn.Parent
    End While
    expanded = pn
    End If
    'This just simulates your code to add the new sub nodes to the main node that was double clicked
    'you need to put your code here instead of this.
    Dim str() As String = {"one.mp3", "Two.mp4", "Three.mvk"}
    Dim s As String = str(r.Next(0, 3))
    e.Node.Nodes.Add(s, s)
    e.Node.Expand()
    End Sub
    End Class
     PS - I notice you are adding more and more Images to your ImageList every time you double click on a node.  If you just add the Images to it once when the app is loading then you can just use the Image Key to set the correct Image to the newly
    added node.
    If you say it can`t be done then i`ll try it

  • How to update PO Price only for a single line item and not other Line Item

    Hi
    My requirement is not to update Price of PO from PIR if the Final Invoice Indiactor is not set and it is not a return PO. I am trying to do this using
    BAPI_PO_CHANGE to update price automatically from Pricing record using
    POITEM-PO_ITEM = '00001'
    POITEM-CALCTYPE = 'B'.
    POITEMX-PO_ITEM = '00001'
    POITEMX-CALCTYPE = 'X'.
    The price gets updated for the line item 1 as well as other line item which I do not want. Please can you tell how to restrict that.
    Is it possible to restrict through configuration if this indicator is set there should be no price update. I tried to check in ME22n and if I update the condition item by pressing the update button the other item price also gets updated.
    Thanks
    Arghadip

    Timestamp is date and time together in one field..
    Search for data element TIMESTAMP.
    If you are getting this in your table.
    If you are getting time and date in different fields then you can use the function module
    given below....
    CALL FUNCTION 'DELTA_TIME_DAY_HOUR'
      EXPORTING
        t1            =
        t2            =
        d1            =
        d2            =
    IMPORTING
       MINUTES       =
    Then you can convert minutes into seconds..
    Function module credit to BrightSide it works....but only it will give difference in minutes
    Regards,
    Lalit Mohan Gupta.

  • How can i get my items to stay in place and not cross over each other when readjusting the browser s

    How can i get my items to stay in place and not cross over each other when readjusting the browser size.
    Basically on my site when i go from a small screen to a big screen everything doesn't adjust to the screen size. I don't know what im missing
    Here's the link to the page all the pages & they all do it
    http://theatricalworkslive.com/
    Thanks in advance

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem.  Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • How come the color of items in some MC can be edited whilst the colors of other MC can't

    How come the color of items in some MC can be edited whilst
    the colors of other MC can't. All layers are unlocked.

    Need more info - could be anything - maybe the object is a
    Drawing Object - or Grouped - or an
    instance of a symbol - or...?
    Chris Georgenes / mudbubble.com / keyframer.com / Adobe
    Community Expert
    nikos_golf wrote:
    > How come the color of items in some MC can be edited
    whilst the colors of other MC can't. All layers are unlocked.

  • When I "save page as" I also get a folder with gif images, jscript script files and other similar items. how can I stop this.

    When I "save page as" via the file button at the top edge of the page, I also get a folder containing gif images, jscript script files and other similar items. I am not is allowed to delete it unless I also delete the page I need. How can I stop this from happening. is it the way I've configured firefox perhaps.
    == since I installed firefox

    Make sure that you have selected "Web Page, complete" to save the page.

  • How to collapse unused text field in PDF form

    Hi all, may i know how to collapse unused text field in a PDF form. Etc, we have alot of description line for user to enter the info, but some line will be left unused, so i was wondering whether can i hide those unused text field. But when i need them, i just expand it and use it.

    I don't think w/o UI Customization it is possible.
    UI customization won't be a small one as it is a common wizard and used at multiple places. So it will be a huge work.

  • How to find and modify  item in a nested array collection?

    Hi,
    would anybody know how to find and modify item in a nested
    array collection:
    private var ac:ArrayCollection = new ArrayCollection([
    {id:1,name:"A",children:[{id:4,name:"AA",children:[{id:8,name:"AAA"}]},{id:5,name:"AB"}]} ,
    {id:2,name:"B",children:[{id:6,name:"BA"},{id:7,name:"BB"}]},
    {id:3,name:"C"}
    Let's say I've got object {id:8, name:"X"} , how could I find
    item in a collection with the correspoding id property, get handle
    on it and update the name property of that object?
    I'm trying to use this as a dataprovider for a tree populated
    via CF and remoting....
    Thanks a lot for help!

    Thanks a lot for your help!
    In the meantime I've come up with a recursive version of the
    code.
    This works and replaces the item on any level deep:
    private function findInAC(ac:ArrayCollection):void{
    var iMatchValue:uint=8;
    for(var i:uint=0; i<ac.length; i++){
    if(ac
    .id == iMatchValue){
    ac.name = "NEW NAME";
    break;
    if(ac
    .children !=undefined){
    findInAC( new ArrayCollection(ac.children));
    However, if I use the array collection as a dataprovider for
    a tree and change it, the tree doesn't update, unless I collapse
    and reopen it.
    Any ideas how to fix it ?

  • How to: define a menu item in an action

    I'm no dummy but I can't figure out how to execute a menu item through an action;
    add button>properties>action>execute menu item. A dialog appears which is blank, and gives me the option of canceling. Maybe a product defect.
    The help documentation defines what it means to execute a menu item, but doesn't expand on how to create one.

    That's great. I'd love to jump into j-script and learn all about it, what it can do, what it's limitations are.... But I'm actually just looking to use the program as it functions (or should) out of the box.
    This feature was accessible in Acro 8. I don't think that java should be necessary to perform this task. But maybe it is. Is anyone else able to use the "execute menu item" action? Because my build (acrobat 9.0 pro extended)only displays a blank selection dialog.
    Thanks for the reply Geo

  • Trinidad Nested Tables Collapse and Expand Functionality Change

    I am using JSF Trinidad 1.2 for JSF Implementation.
    I am using <tr:table> and f:facet's detailStamp component's of Trinidad to get Nested Table functionality. I have three tables i.e. table1, table2, table3. Each row of Table1 has nested Table2 and each row of Table2 has nested Table3. It seems that the collapse and Expand functionality of these component makes AJAX call to the server and fetches the relevant data.
    My requirement is to have data populated to all the three tables during initial Load and use clientSide Javascript function to collapse the Table2 and Table3 rows on initial Display. Once all the table1 rows are displayed, I should have collapse and expand at row level of Table1 that should make Table2 data visible and invisible on click using Javascript i.e. no server side call.
    I am not sure If I can disable the inbuilt AJAX calls on click to expand and collapse. If yes, how I can do that?
    Second Thing will be how I can populate my custom Javascript on those collapse and expand onclick event?
    Thanks In Advance

    Hi Suvidha,
    Thanks for the response, but in my scenario I have a viewset in component A and overview page in component B. I am using viewset as assignment block in component B where i need to change the title on Lazy and Direct mode. Method of IF_BSP_WD_HISTORY_STATE_DESCR for viewset does not work in this scenario.
    I am trying to get a method which get called on change of Lazy and Direct mode for an assignment block .

  • How to collapse a folder in the project bin?

    Hi there.
    I'm trying to figure out how to collapse/expand a folder in the project bin.
    I whipped up a AEGP that listens and reports any/all command IDs, but when I collapse/expand the folder, I'm not getting any command ids.
    I've noticed there are many events that don't send any sort of command ID.
    Any ideas, or do you happen to know the command code that I could issue to collapse/expand a folder?
    I have not yet investigated if the javascript API offers a means to collapse/expand folders.
    Looking at the SDK, a folder is just another AEGP_ItemH.  Is there an attribute on it that I can set to toggle the collapse/expand? I was under the impression that AEGP_ItemH are opaque objects, but I'm still pretty new to this SDK (and well, C programming) so I wasn't sure how to go about inspecting the object.
    thanks!!
    -Andy

    Tom,
    I have now discovered that your suggestion works, but ONLY IF there are NO BACKGROUND TASKS running.  I kept trying this over & over and I did eventually discover an almost imperceptible & very brief extra bolding of the folder name.  However, the focus would never stay on the label.  At some point I noticed my Background Tasks had stopped and then I could change the folder name as any Mac user would expect.  So, there is some undesirable effect associated with the background tasks.
    Thanks for confirming how it is supposed to work.

Maybe you are looking for

  • Unable to sync 30GB Ipod with Windows Vista

    Hi! I just got a new laptop today - it has 64 bit Vista on it. I downloaded the 64 bit version of Itunes and was able to transfer my music to the computer into itunes. But it will not sync. The ipod is formatted with FAT 32 which is what I think mayb

  • A305-s6905 cd drive not working---DVD works fine though

    My computer has a cd/dvd drive that works for dvd use but not for cd. All looks ok in device manager. DVD ROM shows up in My Computer. Any suggestions? Thanks.

  • What are my line stats like. Good or bad?

    Hi there, I've just recently changed ISP to BT, within the last couple of days. I know I'm still probably in my line training state. Using the supplied BT Home Hub 3. My stats so far are: ADSL Line Status Line state:    Connected Connection time:   

  • Stripchart trace name

    Hello, Is it possible to change the legend trace name in a strip chart? If yes, how? Exemple : change "Trace 1" name to "Humidity Sensor" Thanks Solved! Go to Solution.

  • Resetting Flash Player browser plugin menu language to English?

    When right-clicking on a Flash object in Safari 4 I was surprised to discover the menu was in Czech. And when I tried it under my wife's account it was in German. Neither of us have used any other language than English on the system so I'm totally ba