TOC Missing +/- (expand/collapse) boxes

Never seen this before, but my TOC is suddenly missing the
+/- expand/collapse topic buttons. Anyone know what the problem is
here? TOC is set to binary.
Here are the params from the HHC file:
<object type="text/site properties">
<param name="FrameName" value="_blank">
<param name="WindowName" value="FreeDOM">
<param name="SiteType" value="toc">
<param name="Window Styles" value="0x800002">
<param name="ExWindow Styles" value="0x100">
</object>
Any change to params?
Thanks,
John

Hi John
Is this for .CHM or WebHelp? If it's WebHelp, you need some
images. You may obtain some by
clicking
here.
If it's for compiled .CHM, you need to look at the Single
Source Layout properties. Click the Advanced... button, then the
TOC Styles tab. Click to enable Lines from Root, then you will be
able to choose Plus/Minus Squares.
Hope this helps a smidge... Rick

Similar Messages

  • How do I remove the "TOC" btn in the playbar WITHOUT removing the TOC "Expand/Collapse" icon?

    I am working in CP7 on a project with a Table of Contents that is set to 'Overlay'. The client has requested that I remove the "TOC" button in the playbar, without removing the TOC "Expand/Collapse" icon, so that the user can still hide/reveal the TOC when necessary. The only control I can find is the "Show TOC" checkbox under Project > Table of Contents. However, un-checking this option removes both the "TOC" button AND the "Expand/Collapse" icons. Is it possible to remove just the "TOC" button in the playbar?

    If you are using SWF output you can always edit the playbar in Flash and remove it.
    If HTML5 you can edit the JavaScript out put to remove the button from the playbar.

  • Expand/Collapse feature in table maintenance view

    Hello experts,
    We have created a custom table and maintenace view.   For some table rows, the only key value difference is an EFFECTIVE DATE.   The generated table maintenace dialog by default "Collapses" the rows that only differ by Effective Date.  Using the Expand <-> Collapse button, we can see the missing detail for individual rows.
    Can the maintenace dialog be expanded by default?

    Hi,
    See the given link, It may help to you.
    maintenance view
    Regards,
    Shamma

  • [Forum FAQ] How to use parameter to control the Expand/Collapse drill-down options in SSRS report?

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

  • Expand/Collapse function in WAD 7.0

    Hi,
    I have made a report in WAD using a table and a chart. In the output which I am running on a portal I have a table Report Navigation with  in which I have some of the export options and an Expand / Collapse icons are present on the button group and also I have one drop down box calendar year .As soon as I click on the icon Collapse in  the above table Report Navigation my drop down should get collapsed and again when I click on the Expand the drop down should be visible
    Report naviagtion and  Drop down boxes are present in a seperate table where in when I click on the icons( Expand / Collapse ) it should get reflected on the dropdown box which is present on the 2nd table
    I have done the above in WAD 3.5 using Java script Code
    How can this be done in WAD 7.0
    Regards,
    Maya

    Hi,
    After setting the Analysis item properties, just click on the 7th icon on top menu bar, i think its Verify or Check on server. Somthing like that.
    Or try re-opening the template after sometime. Close the existing Web window, where you see your output, and execute the template once again. This should work.
    If nothing of the above works, theres one more thing. You may have to re-create the Template.
    This happens at times when there is no proper connection between the Portal and WAD. I have faced it myself. So, just try something like that.

  • Form - Expand/Collapse sections to simulate website, is this possible?

    Hello,
    My FLA file is based in CS5 with AS3. I posted this in the AS3 forum but if it can be done without AS3 then I am open to that possibility as well.
    I am creating a non-functioning form, meaning I just need it to look like a form but the functionality doesn't need to work. Atleast not in this stage of development.
    The functionality I need basically looks like the following:
    - http://static.geewax.org/checktree/index.html (What would this be called in the flash world?? my google search terms have not been successful)
    Where:
    1. Clicking the arrow expands a section.
    2. The arrow changes to a different arrow when the section is expanded.
    3. It will be inside of a white box, the white box needs to resize to either shrink or get taller when a section is expanded or collapsed.
    One section will be checkboxes, and one section will be radio buttons.
    Thank you very much in advance . I look forward to exploring into how to accomplish such a thing.
    Message was edited by: da4seen

    Okay,
    I know I may be going at this completely wrong but posting my code here so someone can give me feedback so far and point me in directions where I need improvement.
    So far this code:
    1. Expands/Collapses the 1st section, and properly moves the 2nd section to the correct position.
    My problem so far is:
    1. The contents of the 2nd section doesn't update to the correct position when section 1 expands/collapses.
    import fl.controls.CheckBox;
    import fl.controls.RadioButton;
    //Set Variable for collapse position
    var collapsePosition:int = 0;
    // Tab1 Group 1
    var tab1_gp1_main:CheckBox = new CheckBox();
    var tab1_gp1_op1:CheckBox = new CheckBox();
    var tab1_gp1_op2:CheckBox = new CheckBox();
    addChild(tab1_gp1_main);
    tab1_gp1_main.move(-110, -300);
    tab1_gp1_main.width = 120;
    tab1_gp1_main.label = "Landscape";
    // Tab1 Group 2;
    var tab1_gp2_main:CheckBox = new CheckBox();
    var tab1_gp2_op1:CheckBox = new CheckBox();
    var tab1_gp2_op2:CheckBox = new CheckBox();
    addChild(tab1_gp2_main);
    tab1_gp2_main.move(-110, 20 + tab1_gp1_main.y );
    tab1_gp2_main.width = 120;
    tab1_gp2_main.label = "Performance";
    // Section Click Listeners
    tab1_gp1_main.addEventListener(MouseEvent.CLICK, sectionHandler);
    tab1_gp2_main.addEventListener(MouseEvent.CLICK, sectionHandler);
    function sectionHandler(event:MouseEvent):void
        switch (event.currentTarget)
            case tab1_gp1_main :
                switch (tab1_gp1_main.selected)
                    case true :
                        addChild(tab1_gp1_op1);
                        addChild(tab1_gp1_op2);
                        tab1_gp1_op1.move(-100, 20 + tab1_gp1_main.y);
                        tab1_gp1_op1.width = 120;
                        tab1_gp1_op1.label = "test 1";
                        tab1_gp1_op2.move(-100, 20 + tab1_gp1_op1.y);
                        tab1_gp1_op2.width = 120;
                        tab1_gp1_op2.label = "test 2";
                        collapsePosition = tab1_gp2_main.y;
                        tab1_gp2_main.move(-110, 20 + tab1_gp1_op2.y);
                        break;
                    case false :
                        removeChild(tab1_gp1_op1);
                        removeChild(tab1_gp1_op2);
                        tab1_gp2_main.move(-110, collapsePosition);
                        break;
                    default :
                        trace('Something is wrong');
                break;
            case tab1_gp2_main :
                switch (tab1_gp2_main.selected)
                    case true :
                        addChild(tab1_gp2_op1);
                        addChild(tab1_gp2_op2);
                        tab1_gp2_op1.move(-100, 20 + tab1_gp2_main.y);
                        tab1_gp2_op1.width = 120;
                        tab1_gp2_op1.label = "test 1";
                        tab1_gp2_op2.move(-100, 20 + tab1_gp2_op1.y);
                        tab1_gp2_op2.width = 120;
                        tab1_gp2_op2.label = "test 2";
                        break;
                    case false :
                        removeChild(tab1_gp2_op1);
                        removeChild(tab1_gp2_op2);
                        break;
                    default :
                        trace('Something is wrong');
                break;
    I have the above AS code inside a movieclip timeline, not sure if this was proper or not but I was trying to keep some code away from my long AS statements on my main timeline.

  • Create expandable text boxes & maintain Indesign interactive features

    I have a form created in indesign which has interactive buttons included. I exported to pdf and now need to add expandable text boxes. I tried to do this in Livecycle but when i imported the pdf as a flowable form (with a view to make it dynamic) the interactive buttons i had created disappeared. is there a way around this so that i can create expandable text boxes but still maintain the buttons i have created?
    PS i am completely new to Livecycle

    Hi Reggie,
    Here are two versions. One form with a fixed number of pages and the other with a variable number of pages (you can add additional page 1).
    In the fixed number of pages, the click event of the index button includes the following instruction to go to a target page:
    xfa.host.currentPage = 1;
    This works because the page we want is always "1".
    If the form is dynamic and the number of pages can increase (or decrease) from those set at design, then we need to track the actual page number of each target page, at runtime.
    The script in the index button now looks like this:
    xfa.host.currentPage = page2.thisPage.rawValue - 1;
    Here the target page is page2 and on this page we have a field called "thisPage". The instruction is to jump to the current value of thisPage on page 2.
    For each target page that you want to index, you will need a hidden field (thisPage). You need to put this on each page and not on the Master Page.
    Hopefully the examples will help explain this.
    This is how we do it, there probably are other solutions out there.
    In relation to the second part, the link feature in Acrobat will not work with a form developed in LC Designer. Paul has a thread (http://forums.adobe.com/message/1923918#1923918) with a PDF for attaching documents, which were then listed in a list box. This could help you in developing your form.
    Another option is to have a button which becomes visible is there are attachments in the PDF. The click event then shows/hides the attachment panel. The user can then see the attachment and double click on the one they want/need. I know it is not as clean, but it is easier to implement. The javascript for the button would be:
    app.execMenuItem("ShowHideFileAttachment");
    Hope that helps,
    Niall
    the text keeps collapsing...

  • Expanding text boxes to multiple pages

    I have a dynamic form with expanding text boxes that I originally designed on one page.  As I put in the needed items it was clear to have it fit I would need to go to a second page to have everything needed.  When it is the first page alone the preview pdf works properly automaticallly moving the overflow to the next page.  When the second page is inserted to finsih the form the areas not fitting on the first page when typed into the preview fall off into space and you can no longer see them.  I've treid moving around the heirarchy and have not figured it out.  Does anyone know hoi to fix this?  Is it possible to have a 2 page dynamic form that expands?

    Sorry I have been on vacation and in Europe for a week so I was not able to get to this before I left.
    The root subform (Page level) must be set to flowed if you want it to act the way you want. When doing that you can ignore the need to add the 2nd page and allow the product to break the page where it is needed. I modified your form so it would do this. Note that there is no Page 2 and I added some additional subforms to break up different parts of the form (Headers and unnamed subforms). It is good practice to name your subforms and if you do any code that was added may need to be adjusted to take into account these additional structural changes.
    Please find attached the modifed sample.
    Paul

  • How to avoid missing font dialog box(alert) while running the script??

    Hi....
         In Illustrator CS4 ,I tried to skip missing font dialog box(alert box) by using the following  script .But,I could not skip the dialog box
    So if you have any suggestion about this let  me know..
    tell application "Finder"
      set user interaction level to never interact
        activate
        set fileName to (path to desktop folder as string) & "fer11757_f1208.eps"
        --set user interaction level to never interact
        --    set user interaction level of script preferences to never interact
        open file fileName
        --set alert missing fonts to true
        set user interaction level to never interact
        activate
    end tell
    display dialog ("completed")
    end tell
    Thanks,
    Mubeen

    Does this NOT error when run? Your target application here is 'Finder' Apple's system file browser and you are giving it Adobe illustrator commands?
    Im not 100% about the versioning with Illustrator installs I think they are all just…
    Tell application "Adobe Illustrator" -- No CS Versioning?
         -- do stuff here
    end tell
    you could check by just picking the app from this list
    choose application

  • Download manager and download tab missing in options box.

    The download manager and download tab missing in options box when I dropdown tool in menu bar.

    The default Firefox Options window doesn't have a separate tab for Downloads, those prefs are on the General tab below Startup.

  • Expand/Collapse a block in a selection screen

    Hey Folks,
    I have a requirement , where I have a selection screen, with 3 selection blocks. I have a requirement that I need to make 2 of these blocks expandible/collapsible on the toggle of a button.. How can this be achieved.
    In case of a normal screen, I would have had to create the blocks as subscreens (one type of screen for expanded state...another for collapsed state) and called it from the main screen. But how do I achieve the same using the selection screens?
    I was considering creating the blocks as subscreens in the selection screen and calling them in the PBO of the main selection screen. However, I am unsure if thats a wise thing to do since the screen is generated automatically in case of a selection screen and I do believe its not a good idea to manually alter it.
    Does anyone has any pointers on this?
    Thanks and Best Regards,
    Puja.

    Hi,
    I have modified the code to show the expand/collapse ICON accordingly..Please check..
    TABLES sscrfields.
    TYPE-POOLS icon.
    * Expand/collapse buttons.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 2(23)  b1 USER-COMMAND usr1.
    SELECTION-SCREEN END OF LINE.
    * Block 1
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    PARAMETERS: p_test1 TYPE char10  MODIF ID m1,
                p_test2 TYPE char10  MODIF ID m1.
    SELECT-OPTIONS  s_date  FOR sy-datum MODIF ID m1.
    SELECTION-SCREEN END OF BLOCK b1.
    * Block 2
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 2(23)  b2 USER-COMMAND usr2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b2.
    PARAMETERS: p_test3 TYPE char10  MODIF ID m2,
                p_test4 TYPE char10  MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b2.
    * Declarations
    DATA: v_flag, v_flag1.
    INITIALIZATION.
      b1 = 'Button1'.
      b2 = 'Button2'.
      v_flag = 'X'.
      v_flag1 = 'X'.
    AT SELECTION-SCREEN.
    * Check the user command.
      IF sy-ucomm = 'USR1'.
        IF v_flag IS INITIAL.
          v_flag = 'X'.
        ELSE.
          CLEAR v_flag.
        ENDIF.
      ELSEIF sy-ucomm = 'USR2'.
        IF v_flag1 IS INITIAL.
          v_flag1 = 'X'.
        ELSE.
          CLEAR v_flag1.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      IF v_flag1 = 'X'.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_expand
            text   = 'Button 2'
            info   = 'Button 2'
          IMPORTING
            RESULT = b2
          EXCEPTIONS
            OTHERS = 0.
      ELSEIF v_flag1 IS INITIAL.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_collapse
            text   = 'Button 2'
            info   = 'Button 2'
          IMPORTING
            RESULT = b2
          EXCEPTIONS
            OTHERS = 0.
      ENDIF.
      IF v_flag = 'X'.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_expand
            text   = 'Button 1'
            info   = 'Button 1'
          IMPORTING
            RESULT = b1
          EXCEPTIONS
            OTHERS = 0.
      ELSEIF v_flag IS INITIAL.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_collapse
            text   = 'Button 1'
            info   = 'Button 1'
          IMPORTING
            RESULT = b1
          EXCEPTIONS
            OTHERS = 0.
      ENDIF.
      LOOP AT SCREEN.
    * Expand collapse block1
        IF v_flag = 'X' AND screen-group1 = 'M1'.
          screen-active = 0.
        ELSEIF v_flag IS INITIAL AND screen-group1 = 'M1'.
          screen-active = 1.
        ENDIF.
    * Expand collapse block2
        IF v_flag1 = 'X' AND screen-group1 = 'M2'.
          screen-active = 0.
        ELSEIF v_flag1 IS INITIAL AND screen-group1 = 'M2'.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Thanks
    Naren

  • The box in my Photoshop Elements, which shows the size and types of brushes has shrunk to one unreadable line. How do I expand the box to its original size?  I have tried dragging it open but nothing moves.

    The box in my Photoshop Elements, which shows the size and type of brushes, has shrunk to one unreadable line. How can I expand this box to its original size? I have tried dragging it open but nothing happens and none of the tool boxes appear to give me an expansion option

    Well, when you open the program, the splash screen, the window you see while the program is opening, should make that clear enough. For example:

  • Expand/Collapse all the Bookmarks in a PDF file

    Hi,
    This is my first message on the board :-)
    I work with very large PDF files (i.e 2000 pages, 700 bookmarks on 5 or 6 levels!) and I'm looking for a script (Acrobat 9 Pro) allowing to expand/collapse all the bookmarks in a PDF file.
    Thanks in advance for your valuable help,
    Cheers
    Antonella

    The Acrobat Javascript Scripting reference (http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJS.pdf) describes how to use scripting to access bookmarks and how to open and close them, which is what you're looking for.
    I suggest you read the reference and make a function that will do the job for you.
    That's the way I would do it.
    I don't think you can access the keyboard shortcuts "/" and "Shift + *" via scripting.
    Torben.

  • Missing advanced dialog box in photoshop elements 9

    I am hoping someone out there can help. I have a missing advanced dialog box on my photoshop downloader page. I have photoshop elements 9. I saw that changing the screen resolution can sometime help this, however it does not in my case, I've tried all available. I have a new Dell Inspiron laptop and resolution is set at 1366 X 768. My computer was preloaded with photoshop elements 8. I can see the advanced dialog box in version 8. However, it is not in version 9. Does anyone have a suggestion? Thanks for your help.

    Check your screen resolution settings for vista.
    I believe the screen resolution needs to be at least 1024 x 768 for the camera raw dialog to show in pse 8.
    For example, if instead of running VirtualBox full screen, your running it in windowed or seamless mode and made the window smaller by dragging on the corner, that would automatically lessen the screen resolution in vista.

  • JTree with XML content expand/collapse problem

    Hello all,
    I'm having this very weird problem with a JTree I use to display the contents of an XML file. I use the DOM parser (and not JDOM since I want the application to run as an applet as well, and don't want to have any external libraries for the user to download) and have a custom TreeModel and TreeNode implementations to wrap the DOM nodes so that they are displayed by the JTree.
    I have also added a popup menu in the tree, for the user to be able to expand/collapse all nodes under the selected one (i.e. a recursive method).
    When expandAll is run, everything works fine and the children of the selected node are expanded (and their children and so on).
    However, after the expansion when I run the collapseAll function, even though the selected node collapses, when I re-expand it (manually not by expandAll) all of it's children are still fully open! Even if I collapse sub-elements of the node manually and then collapse this node and re-expand it, it "forgets" the state of it's children and shows them fully expanded.
    In other words once I use expandAll no matter what I do, the children of this node will be expanded (once I close it and re-open it).
    Also after running expandAll the behaviour(!) of the expanded nodes change: i have tree.setToggleClickCount(1); but on the expanded nodes I need to double-click to collapse them.
    I believe the problem is related to my implementations of TreeModel and TreeNode but after many-many hours of trying to figure out what's happening I'm desperate... Please help!
    Here's my code:
    public class XMLTreeNode implements TreeNode 
         //This class wraps a DOM node
        org.w3c.dom.Node domNode;
        protected boolean allowChildren;
        protected Vector children;
        //compressed view (#text).
         private static boolean compress = true;   
        // An array of names for DOM node-types
        // (Array indexes = nodeType() values.)
        static final String[] typeName = {
            "none",
            "Element",
            "Attr",
            "Text",
            "CDATA",
            "EntityRef",
            "Entity",
            "ProcInstr",
            "Comment",
            "Document",
            "DocType",
            "DocFragment",
            "Notation",
        static final int ELEMENT_TYPE =   1;
        static final int ATTR_TYPE =      2;
        static final int TEXT_TYPE =      3;
        static final int CDATA_TYPE =     4;
        static final int ENTITYREF_TYPE = 5;
        static final int ENTITY_TYPE =    6;
        static final int PROCINSTR_TYPE = 7;
        static final int COMMENT_TYPE =   8;
        static final int DOCUMENT_TYPE =  9;
        static final int DOCTYPE_TYPE =  10;
        static final int DOCFRAG_TYPE =  11;
        static final int NOTATION_TYPE = 12;
        // The list of elements to display in the tree
       static String[] treeElementNames = {
            "node",
      // Construct an Adapter node from a DOM node
      public XMLTreeNode(org.w3c.dom.Node node) {
        domNode = node;
      public String toString(){
           if (domNode.hasAttributes()){
                return domNode.getAttributes().getNamedItem("label").getNodeValue();
           }else return domNode.getNodeName();      
      public boolean isLeaf(){ 
           return (this.getChildCount()==0);
      boolean treeElement(String elementName) {
          for (int i=0; i<treeElementNames.length; i++) {
            if ( elementName.equals(treeElementNames)) return true;
    return false;
    public int getChildCount() {
         if (!compress) {   
    return domNode.getChildNodes().getLength();
    int count = 0;
    for (int i=0; i<domNode.getChildNodes().getLength(); i++) {
    org.w3c.dom.Node node = domNode.getChildNodes().item(i);
    if (node.getNodeType() == ELEMENT_TYPE
    && treeElement( node.getNodeName() ))
    // Note:
    // Have to check for proper type.
    // The DOCTYPE element also has the right name
    ++count;
    return count;
    public boolean getAllowsChildren() {
         // TODO Auto-generated method stub
         return true;
    public Enumeration children() {
         // TODO Auto-generated method stub
         return null;
    public TreeNode getParent() {
         // TODO Auto-generated method stub
         return null;
    public TreeNode getChildAt(int searchIndex) {
    org.w3c.dom.Node node =
    domNode.getChildNodes().item(searchIndex);
    if (compress) {
    // Return Nth displayable node
    int elementNodeIndex = 0;
    for (int i=0; i<domNode.getChildNodes().getLength(); i++) {
    node = domNode.getChildNodes().item(i);
    if (node.getNodeType() == ELEMENT_TYPE
    && treeElement( node.getNodeName() )
    && elementNodeIndex++ == searchIndex) {
    break;
    return new XMLTreeNode(node);
    public int getIndex(TreeNode tnode) {
         if (tnode== null) {
              throw new IllegalArgumentException("argument is null");
         XMLTreeNode child=(XMLTreeNode)tnode;
         int count = getChildCount();
         for (int i=0; i<count; i++) {
              XMLTreeNode n = (XMLTreeNode)this.getChildAt(i);
              if (child.domNode == n.domNode) return i;
         return -1; // Should never get here.
    public class XMLTreeModel2 extends DefaultTreeModel
         private Vector listenerList = new Vector();
         * This adapter converts the current Document (a DOM) into
         * a JTree model.
         private Document document;
         public XMLTreeModel2 (Document doc){
              super(new XMLTreeNode(doc));
              this.document=doc;
         public Object getRoot() {
              //System.err.println("Returning root: " +document);
              return new XMLTreeNode(document);
         public boolean isLeaf(Object aNode) {
              return ((XMLTreeNode)aNode).isLeaf();
         public int getChildCount(Object parent) {
              XMLTreeNode node = (XMLTreeNode) parent;
    return node.getChildCount();
         public Object getChild(Object parent, int index) {
    XMLTreeNode node = (XMLTreeNode) parent;
    return node.getChildAt(index);
         public int getIndexOfChild(Object parent, Object child) {
    if (parent==null || child==null )
         return -1;
              XMLTreeNode node = (XMLTreeNode) parent;
    return node.getIndex((XMLTreeNode) child);
         public void valueForPathChanged(TreePath path, Object newValue) {
    // Null. no changes
         public void addTreeModelListener(TreeModelListener listener) {
              if ( listener != null
    && ! listenerList.contains( listener ) ) {
    listenerList.addElement( listener );
         public void removeTreeModelListener(TreeModelListener listener) {
              if ( listener != null ) {
    listenerList.removeElement( listener );
         public void fireTreeNodesChanged( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesChanged( e );
         public void fireTreeNodesInserted( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesInserted( e );
         public void fireTreeNodesRemoved( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesRemoved( e );
         public void fireTreeStructureChanged( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeStructureChanged( e );
    The collapseAll, expandAll code (even though I m pretty sure that's not the problem since they work fine on a normal JTree):
        private void collapseAll(TreePath tp){
             if (tp==null) return;
             Object node=tp.getLastPathComponent();
             TreeModel model=tree.getModel();
             if (!model.isLeaf(node)){
                  tree.collapsePath(tp);
                  for (int i=0;i<model.getChildCount(node);i++){
                  //for (int i = node.childCount()-4;i>=0;i--){
                       collapseAll(tp.pathByAddingChild(model.getChild(node,i)));
                  tree.collapsePath(tp);
        private void expandAll(TreePath tp){
             if (tp==null) return;
             Object node=tp.getLastPathComponent();
             TreeModel model=tree.getModel();
             if (!model.isLeaf(node)){
                  tree.expandPath(tp);
                  for (int i=0;i<model.getChildCount(node);i++){
                  //for (int i = node.childCount()-4;i>=0;i--){
                       expandAll(tp.pathByAddingChild(model.getChild(node,i)));

    Hi,
    Iam not facing this problem. To CollapseAll, I do a tree.getModel().reload() which causes all nodes to get collapsed and remain so even if I reopen them manually.
    Hope this helps.
    cheers,
    vidyut

Maybe you are looking for

  • Imac no longer charging via usb

    27" iMac Intel Core i5 OS X (10.6.7) So plugged in the ipod (via usb to the back of the imac) and left it to charge overnight. The next morning I notice it is not showing up in Itunes, and lo and behold has not charged a lick! So I thought it was the

  • Passing binary output in servlets

    Hi all, I am new to struts.In Jsp i need to give three text field values 1.category 2.two date fields. On click of submit button,it should export the csv file from db into excel sheets. If i didnt give the input values properly and clicking the submi

  • NAC 4.7.1 L3 OOB - Temporary Role bugs ?

    Hi We have a L3 OOB routed gateway configuration (with redundant CAS and CAM), We are currently running 4.7.1 on the appliances and the agent is 4.7.10. We have experienced two problems: 1. On several occasions we can abort a valid logon, but can sti

  • Translation of KM Document iView

    Hello Experts, I have created a KM Document iView that is opening a HTML page. Is it possible to create a translation for this iView (e.g. the content of the HTML file). Or does anyone know how to handle this otherwise. Any input is greatly appreciat

  • Adjusting audio levels on an entire audio track

    it may sound like a rookie question, but how do i change the level on an entire audio track, start to end. i am not interested in a "nest items" command, but in a situation that lowers every audio clip on the track by x and allows me still to see all