Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2008
    Posts
    79
    Vote Rating
    0
    Cputerace is on a distinguished road

      0  

    Default [FIXED] [RC2] TreePanel not appearing after TreeStore.removeAll()

    [FIXED] [RC2] TreePanel not appearing after TreeStore.removeAll()


    I have boiled our code down to the following prototype which displays the issue we are having. When we initially populate a treestore, it displays fine (press populate). When we clear the screen (press clear) then subsequently populate the treestore again (press populate), the space for each of the items is there, but the items are not visible. You can mouse over the positions where they should be showing and it will grey out the line as if they are there.

    Code:
    package com.mycompany.gwtprototype.client;
    
    import com.extjs.gxt.ui.client.data.BaseModelData;
    import com.extjs.gxt.ui.client.data.BaseTreeModel;
    import com.extjs.gxt.ui.client.event.ButtonEvent;
    import com.extjs.gxt.ui.client.event.SelectionListener;
    import com.extjs.gxt.ui.client.store.TreeStore;
    import com.extjs.gxt.ui.client.widget.ContentPanel;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.TabItem;
    import com.extjs.gxt.ui.client.widget.TabPanel;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
    import com.extjs.gxt.ui.client.widget.treepanel.TreePanel;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class GwtPrototype implements EntryPoint {
    
        private Viewport v = new Viewport();
    	private TreeStore<BaseModelData> ts = new TreeStore<BaseModelData>();
    	private TreePanel<BaseModelData> treePanel;
    	private ContentPanel mainCP = new ContentPanel();
    	LayoutContainer screen = new LayoutContainer();
        
        public void onModuleLoad() {
            RootPanel.get().add(v);
            v.setHeight("100%");
            v.setLayout(new FlowLayout());
            Button clearScreen = new Button("Clear Screen");
            clearScreen.addSelectionListener(new SelectionListener<ButtonEvent>(){
    			@Override
    			public void componentSelected(ButtonEvent ce)
    			{
    				clearScreen();
    			}});
    		Button populateScreen = new Button("Populate Screen");
    		populateScreen.addSelectionListener(new SelectionListener<ButtonEvent>(){
    			@Override
    			public void componentSelected(ButtonEvent ce)
    			{
    				populateScreen();
    			}});
    		v.add(mainCP);
    		v.add(clearScreen);
    		v.add(populateScreen);
    		v.layout();
            
    		treePanel = new TreePanel<BaseModelData>(ts);
    		treePanel.setDisplayProperty("name");
    		TabPanel tabPanel = new TabPanel();
    		TabItem tabItem = new TabItem("A Tab");
    		tabItem.add(treePanel);
    		tabPanel.add(tabItem);
    		screen.add(tabPanel);
        }
    
    	protected void populateScreen()
    	{
    		ts.removeAll();
    		final BaseTreeModel root = new BaseTreeModel();
    		root.set("name", "another item");
    		final BaseTreeModel root2 = new BaseTreeModel();
    		root2.set("name", "another item");
    		final BaseTreeModel root3 = new BaseTreeModel();
    		root3.set("name", "another item");
    		ts.add(root, true);
    		ts.add(root2, true);
    		ts.add(root3, true);
    		mainCP.removeAll();
    		mainCP.add(screen);
    		mainCP.layout();
    	}
    
    	protected void clearScreen()
    	{
    		mainCP.removeAll();
    	}
    }

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2008
    Posts
    79
    Vote Rating
    0
    Cputerace is on a distinguished road

      0  

    Default


    Any update on this? It is breaking our app.

  3. #3
    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


    Fixed in SVN

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