Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: [FNR] TreePanel and Accordion Layout

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jun 2009
    Posts
    7

    Default [FNR] TreePanel and Accordion Layout

    After changing the tree information in the settings panel no treePanel is visible.

    I make a small sample and using gxt 2.0.4. (windows NT Hosted Mode)
    Code:
    /**
     * Entry point classes define <code>onModuleLoad()</code>.
     */
    public class GWTDemo implements EntryPoint {
     private Folder model;
        private TreeStore<ModelData> store;
     private String flag = "old";
        public void onModuleLoad() {
     
         Viewport v = new Viewport();
         v.setLayout(new FlowLayout(10));  
         ContentPanel panel = new ContentPanel();  
         panel.setHeading("AccordionLayout GXT Version: " + GXT.getVersion().getRelease());  
         panel.setBodyBorder(false);
     
         panel.setLayout(new AccordionLayout());  
     
         ContentPanel cp = new ContentPanel();  
         cp.setAnimCollapse(false);  
         cp.setHeading("Online Users");  
         panel.add(cp);
     
         // old Tree 
         final Tree tree2 = new Tree();  
         tree2.getStyle().setLeafIconStyle("icon-music");  
         TreeBuilder.buildTree(tree2, this.getStartTreeModel("Tree")); 
     
         model = this.getStartTreeModel("TreePanel" );  
         store = new TreeStore<ModelData>();  
         store.add(model.getChildren(), true);  
     
         // new TreePanel   
         final TreePanel<ModelData> tree = new TreePanel<ModelData>(store);  
         tree.setDisplayProperty("name");  
         tree.setWidth(250);  
     
         cp.add(tree);  
         cp.add(tree2);  
         cp = new ContentPanel();  
         cp.setAnimCollapse(false);  
         cp.setBodyStyleName("pad-text");  
         cp.setHeading("Settings");  
         cp.addText("Change Tree");  
         cp.add(new Button("Change Tree Setting", new SelectionListener<ButtonEvent>() {  
               public void componentSelected(ButtonEvent ce) {
              if (flag.equalsIgnoreCase("old"))
               flag="new";
              else 
               flag="old";
                 store.removeAll();
                 tree2.removeAll();
                 model = this.getTreeModel(flag, "TreePanel");
                 store.add(model.getChildren(), true);  
     
                 TreeBuilder.buildTree(tree2, this.getTreeModel(flag, "Tree")); 
     
               }
               private Folder getTreeModel(String flag , String treeform) {
               if (flag.equalsIgnoreCase("old")){
                Folder[] folders = new Folder[] {
                        new Folder("Mozart " + treeform , new Folder[] {new Folder("Concertos", new Music[] {
                            new Music("Clarinet Concerto", "Mozart", "Concertos"),
                            new Music("Violin Concerto No. 15", "Mozart", "Concertos"),
                            new Music("Violin Concerto No. 14", "Mozart", "Concertos"),}),}),};
                    Folder root = new Folder("root");
                    for (int i = 0; i < folders.length; i++) {
                      root.add((Folder) folders[i]);
                    }
                    return root;
               }
               else{
                Folder[] folders = new Folder[] {
                        new Folder("Bach " + treeform, new Folder[] {new Folder("Concertos", new Music[] {
                            new Music("Violin Concerto No. 5", "Mozart", "Concertos"),
                            new Music("Violin Concerto No. 4", "Mozart", "Concertos"),}),}),};
                    Folder root = new Folder("root");
                    for (int i = 0; i < folders.length; i++) {
                      root.add((Folder) folders[i]);
                    }
                    return root;
               }
          }  
             }),new FlowData(10));  
         panel.add(cp);  
         panel.setSize(200, 325);  
         v.add(panel);
           RootPanel.get().add(v);
    }
     
        public Folder getStartTreeModel(String treeform) {
            Folder[] folders = new Folder[] {
                    new Folder("Start " + treeform, new Folder[] {new Folder("Concertos", new Music[] {
                        new Music("Piano Concerto No. 1", "Mozart", "Concertos"),
                        new Music("Clarinet Concerto No. 2", "Mozart", "Concertos"),
                        new Music("Violin Concerto No. 3", "Mozart", "Concertos"),
                        new Music("Violin Concerto No. 4", "Mozart", "Concertos"),}),}),};
                Folder root = new Folder("root");
                for (int i = 0; i < folders.length; i++) {
                  root.add((Folder) folders[i]);
                }
                return root;
         } 
    }
    The first picture shows the start window.
    p1.jpg

    If I change some settings in the setting panel I want update the tree items.
    p2.JPG

    After pressing the button "Change tree setting" and opening the online users panel the tree should have new items.
    p3.JPG

    The tree is visible but the treePanel is not visible.
    p4.JPG

    A doubleclick above the tree make the treepanel visible.
    Is this a problem of my program or a bug?
    If the button is placed in the online users panel all works fine.

    Thanks Frank

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    This is linked to some browser problem. We will add a workaround for this into 2.1.

    Please use the forum search before posting bugs, because this was reported before many times.

  3. #3
    Ext Premium Member
    Join Date
    Sep 2009
    Posts
    77

    Default

    Is this issue fixed in 2.1.1?
    I have just tested it with 2.1.1 and it is still there. Is there any chance to provide a fix in a future release?

  4. #4

    Default

    I have a problem that I think is simular to this issue.
    I have a ContentPanel with AccordionLayout. The panel contains to ContentPanels and if I add a tree to the first panel, everything works fine, but if I add it to the second panel (the one not open) the tree is not visible. The tree is there but you cant see it. If I resize the panel och dubbleclick the area where the tree is supposed to be it appears.

  5. #5
    Ext Premium Member
    Join Date
    Sep 2009
    Posts
    77

    Default

    I still have the issue, too, but it looks like nobody believes us.

  6. #6

    Default

    Perhaps we should start a new thread without [CLOSED] in the title and supply a simplyfied sample that illustrates this issue. Could you do that?

  7. #7
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    Quote Originally Posted by tonjac View Post
    I have a problem that I think is simular to this issue.
    I have a ContentPanel with AccordionLayout. The panel contains to ContentPanels and if I add a tree to the first panel, everything works fine, but if I add it to the second panel (the one not open) the tree is not visible. The tree is there but you cant see it. If I resize the panel och dubbleclick the area where the tree is supposed to be it appears.
    It is the same issue. A later release will add a fix for this.

    Perhaps we should start a new thread without [CLOSED] in the title and supply a simplyfied sample that illustrates this issue. Could you do that?
    No need for this as this is a duplicate report.

  8. #8
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I commited a fix for this in SVN at revision 1965

  9. #9
    Ext Premium Member
    Join Date
    Sep 2009
    Posts
    77

    Default

    Will this be included in a 2.1.2 release?
    When do you estimate this release happening?

    Regards,

    Dan

  10. #10
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    That release already happened. So it wont be part of it

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •