Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default (Beta 4) Grid refresh bug

    (Beta 4) Grid refresh bug


    There is a new grid refresh bug. Calling the grid.refresh(true) method renders a second header. Calling it again adds another header and so on. This did not exist in beta 3 afaik. A simple example:

    Code:
    public class MyClass implements EntryPoint
    {
        private static final StockProperties props = GWT.create(StockProperties.class);
    
        public void onModuleLoad()
        {
            ColumnConfig<Stock, String> nameCol = new ColumnConfig<Stock, String>(props.name(), 150, "Name");
            ColumnConfig<Stock, Integer> sortCol =
                    new ColumnConfig<Stock, Integer>(props.sortindex(), 150, "SortIndex");
    
            ListStore<Stock> store = new ListStore<Stock>(props.key());
    
            store.add(new Stock("myKey", "myNagdfme", 1));
            store.add(new Stock("myK3ey", "myNgfdame", 1));
    
            List<ColumnConfig<Stock, ?>> l = new ArrayList<ColumnConfig<Stock, ?>>();
            l.add(nameCol);
            l.add(sortCol);
    
            ColumnModel<Stock> cm = new ColumnModel<Stock>(l);
    
            final Grid<Stock> grid = new Grid<Stock>(store, cm);
            grid.setPixelSize(400, 300);
            grid.getView().setAutoExpandColumn(nameCol);
            grid.setBorders(false);
    
            VerticalLayoutContainer con = new VerticalLayoutContainer();
    
            TextButton button = new TextButton("refresh");
            button.addSelectHandler(new SelectHandler()
            {
    
                @Override
                public void onSelect(SelectEvent event)
                {
                    grid.getView().refresh(true);
                }
            });
    
            con.setBorders(true);
            con.add(grid, new VerticalLayoutData(1, -1));
            con.add(button, new VerticalLayoutData(1, -1));
            con.setPixelSize(400, 500);
            RootLayoutPanel.get().add(con);
        }
    
        interface StockProperties extends PropertyAccess<Stock>
        {
            ModelKeyProvider<Stock> key();
    
            ValueProvider<Stock, String> name();
    
            ValueProvider<Stock, Integer> sortindex();
        }
    
        class Stock
        {
            public Stock(String key, String name, int sortindex)
            {
                this.key = key;
                this.name = name;
                this.sortindex = sortindex;
            }
    
            int sortindex = 0;
            String key = "";
            String name = "";
    
            public String getKey()
            {
                return key;
            }
    
            public void setKey(String key)
            {
                this.key = key;
            }
    
            public String getName()
            {
                return name;
            }
    
            public void setName(String name)
            {
                this.name = name;
            }
    
            public int getSortindex()
            {
                return sortindex;
            }
    
            public void setSortindex(int sortindex)
            {
                this.sortindex = sortindex;
            }
        }
    
    }

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    Thanks for the report and for providing the test case. However, this issue has already been raised in http://www.sencha.com/forum/showthre...)-you-get-dups, and it has been fixed in SVN. Please follow that thread for any further discussion of this bug.

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