Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    Pandaman is on a distinguished road

      0  

    Default [FIXED] [2.0 RC2] 2 TreeGrid bugs

    [FIXED] [2.0 RC2] 2 TreeGrid bugs


    - GXT version: 2.0 RC2
    - Mode: web
    - Browser and version: Firefox 3.0.11, IE 6 (haven't tried any other browsers)
    - Operating System: Windows XP SP3

    I am running into a couple bugs with TreeGrid. The code located at the bottom of this post is supposed to populate the TreeGrids on tabs 1 and 2 with parent0-parent9 such that parent0-parent4 each have 1 child. Here are the steps where that doesn't happen:


    1st bug:
    - refresh page (ctrl-r)
    - make sure Tab 1 is the tab in view
    - click Refresh Tab 1, then Refresh Tab 2
    - Click Tab 2
    >> Duplicate parent data for Tab 2s TreeGrid, parent0 is the only node with a child


    2nd bug:
    - Follow steps for 1st bug
    - click Tab 1
    - click Refresh Tab 1, then Refresh Tab 2
    - click Tab 2
    >> Only some parents have been loaded into view (for me, only parent0-parent2 w/ appropriate children). When name column is sorted, the rest of the data is loaded into view.


    Code:
    public void onModuleLoad() {
            final Viewport viewport = new Viewport();
            final ContentPanel contentPanel = new ContentPanel(new FitLayout());
            contentPanel.setSize(600, 500);
    
            final TabPanel tabPanel = new TabPanel();
            final TabItem tab1 = new TabItem("Tab 1");
            final TabItem tab2 = new TabItem("Tab 2");
            
            final TreeGrid<ModelData> treeGrid1 = buildTestTreeGrid();
            final TreeGrid<ModelData> treeGrid2 = buildTestTreeGrid();
    
            tab1.add(treeGrid1);
            tab2.add(treeGrid2);
            
            tabPanel.add(tab1);
            tabPanel.add(tab2);
            
            contentPanel.add(tabPanel);
    
            contentPanel.addButton(new Button("Refresh Tab 1", new TestSelectionListener(treeGrid1)));
            contentPanel.addButton(new Button("Refresh Tab 2", new TestSelectionListener(treeGrid2)));
    
            viewport.add(contentPanel);
            RootPanel.get().add(viewport);
    }
        
    public static TreeGrid<ModelData> buildTestTreeGrid() {
            final List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
            final ColumnConfig column = new ColumnConfig("name", "name", 500);
            columns.add(column);
            column.setRenderer(new TreeGridCellRenderer<BeanModel>());
            final TreeGrid<ModelData> treeGrid = new TreeGrid<ModelData>(new TreeStore<ModelData>(),  new ColumnModel(columns));
            treeGrid.setHeight(400);
            
            return treeGrid;
    }
        
    public static class TestSelectionListener extends SelectionListener<ButtonEvent> {
    
            private final TreeGrid<ModelData> _treeGrid;
            
            public TestSelectionListener(final TreeGrid<ModelData> treeGrid) {
                _treeGrid = treeGrid;
            }
            
            @Override
            public void componentSelected(ButtonEvent ce) {
                final TreeStore<ModelData> treeStore = _treeGrid.getTreeStore();
                
                treeStore.removeAll();
                
                final List<ModelData> parents = new ArrayList<ModelData>();
                
                for (int i=0; i<10; i++) {
                    final BaseModelData parent = new BaseModelData();
                    parent.set("name", "parent" + i);
                    
                    parents.add(parent);
                }
                
                treeStore.add(parents, false);
                
                for (int i=0; i<5; i++) {
                    final BaseModelData child = new BaseModelData();
                    child.set("name", "child" + i);
                    
                    treeStore.add(parents.get(i), child, false);
                }
                
                _treeGrid.getView().refresh(true);
        }
            
    }

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    In the meantime GXT2 final was released. I suggest to upgrade to it (RC3 was also released before)

    Many treegrid bugs got fixed. Try your code with the new release please.

  3. #3
    Ext User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    Pandaman is on a distinguished road

      0  

    Default


    Oh I didn't even notice. I'll take the full release for a spin then, thanks.

  4. #4
    Ext User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    Pandaman is on a distinguished road

      0  

    Default


    These bugs still exist in the final release version

  5. #5
    Ext User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    Pandaman is on a distinguished road

      0  

    Default


    Any progress on this?

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    There are a couple of issues in your code. You are trying to refresh a not rendered grid. You first have to check if the grid is rendered or you need to set deferredrenderingof your tabpanel to false. However adding something to the store also throws an exception if the grid is not rendered. This is fixed in SVN now.

    For your second issue you need to use HideMode.OFFSET on the tabitems.

  7. #7
    Ext User
    Join Date
    Jul 2009
    Posts
    56
    Vote Rating
    0
    Pandaman is on a distinguished road

      0  

    Default


    Thank you for your response, this solved my issues.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar