1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default [2.2.0 RC] Grid with CheckBoxSelectionModel doesn't paint the table

    [2.2.0 RC] Grid with CheckBoxSelectionModel doesn't paint the table


    Hello.

    I updated my project to the last version and today I realized that my grid is not showing any elements on it.
    If I use the inspector on Chrome I can find the content in the code, but the grid only shows the header, the body white. It doesn't paint even the scroll or the empty rows, just the header and a huge white space.

    It was working on 2.2.0 beta.

    Thanks.

  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


    Please post a fully working testcase that implements EntryPoint. You will see that all examples work without any updates widht GXT 2.2 rc1

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default


    Hello Sven.

    Here is my code.
    I think the problem comes from using a layout with AccordionLayout.

    Code:
    // Main layout
    LayoutContainer filtrosPanel = new LayoutContainer(new AccordionLayout());
    filtrosPanel.setSize(100, 500);
    filtrosPanel.setBorders(true);
    filtrosPanel.setScrollMode(Scroll.AUTOY);
    filtrosPanel.setId("acordeonFiltros");
    
    // Inside layout
    ContentPanel filtroPanel = new ContentPanel(new RowLayout());
    filtroPanel.setAnimCollapse(false);
    filtroPanel.setSize(100, 500);
    filtroPanel.setHeading("Proof container");
    
    // Load datas
    List<VFiltro> filtro = filtros.get(i); 
    			
    BeanModelFactory filtroFactory = BeanModelLookup.get().getFactory(VFiltro.class);
    List<BeanModel> filtroModel = filtroFactory.createModel(filtro);
    			
    final ListStore<BeanModel> storeFiltro = new ListStore<BeanModel>();  
    storeFiltro.add(filtroModel);
    
    // CheckBoxes plugin
    CheckBoxSelectionModel<BeanModel> sm = new CheckBoxSelectionModel<BeanModel>(); 
    
    List<ColumnConfig> configs = new ArrayList<ColumnConfig>(); 
    configs.add(sm.getColumn());  
    
    ColumnConfig column = new ColumnConfig();  
    column.setSortable(false);
    column.setMenuDisabled(true);
    column.setId("descripcion");  
    column.setHeader("Descripción");  
    column.setWidth(240);  
    configs.add(column);  
    
    ColumnModel cm = new ColumnModel(configs);
    
    // Grid + plugin
    Grid<BeanModel> grid = new Grid<BeanModel>(storeFiltro, cm); 
    grid.setColumnReordering(true);  
    grid.getAriaSupport().setLabelledBy(filtroPanel.getHeader().getId() + "-label");  
    grid.addPlugin(sm); 
    		    
    filtroPanel.add(grid, new RowData(1,1)); 
    filtrosPanel.add(filtroPanel);
    As you can see it's the same code than in your example, but with the diference of the AccordionLayout.

    Thank you again.

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


    Can you please post some fully working testcase that implements EntryPoint for this?

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


    I did a testcase with an AccordionLayout but itstill renders fine.

  6. #6
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default


    Hello Sven.

    I've been making some tests and I've been always getting the same rendering problem.
    It seems something has changed from the last version and now my grid is not taking the correct height, look the next code:

    Code:
    <div class="x-grid3" role="presentation" styles="width: 260px; height 21px;">
      <div class="x-grid3-viewport" role="presentation">
         <div class="x-grid3-header" role="presentation">_</div>
         <div class="x-grid3-scroller" role="presentation" styles="width: 260px; height: 0px;">     <--- HEIGHT: 0px;
             <div class="x-grid3-body" role="presentation">
               --- rows ---
    In 2.2.0 beta I had the next code and it was rendering the height perfectly.
    Code:
    Grid<BeanModel> grid = new Grid<BeanModel>(storeFiltro, cm); 
    grid.getView().setAutoFill(true);
    grid.setSelectionModel(sm);
    grid.addPlugin(sm);
    Now I have to set the height in order to render it.
    Code:
    Grid<BeanModel> grid = new Grid<BeanModel>(storeFiltro, cm);
    grid.setSelectionModel(sm);
    grid.addPlugin(sm); 
    grid.setHeight(panelHeight);
    So I guess "grid.getView().setAutoFill(true);" is not working correctly in this last version, isn't it?.


    Thanks for your help.

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


    AutoFIll is not setting any height. You should always size your grid. Can you please post a fully working testcase for your issue? According to your codesnippets you are sizing your grid. Probably there is an issue in your layoutchain.

  8. #8
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    AutoFIll is not setting any height. You should always size your grid. Can you please post a fully working testcase for your issue? According to your codesnippets you are sizing your grid. Probably there is an issue in your layoutchain.
    Here is a testcase:
    Code:
    import java.util.ArrayList;
    import java.util.List;
    
    import com.extjs.gxt.samples.resources.client.TestData;  
    import com.extjs.gxt.samples.resources.client.model.Stock;  
    import com.extjs.gxt.ui.client.Style.Scroll;
    import com.extjs.gxt.ui.client.data.BeanModel;
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.widget.ContentPanel;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel;
    import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
    import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
    import com.extjs.gxt.ui.client.widget.grid.Grid;
    import com.extjs.gxt.ui.client.widget.layout.AbsoluteLayout;
    import com.extjs.gxt.ui.client.widget.layout.AccordionLayout;
    import com.extjs.gxt.ui.client.widget.layout.RowData;
    import com.extjs.gxt.ui.client.widget.layout.RowLayout;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.PopupPanel;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class Test implements EntryPoint {
    	
    	public void onModuleLoad() {
    		
    		final PopupPanel popUp = new PopupPanel(true);
    		
    		ContentPanel popUpContent = new ContentPanel(new AbsoluteLayout());
    		popUpContent.setHeaderVisible(false);
    		popUpContent.setSize(400, 600);
    		
    		// Accordion
    		LayoutContainer filtrosPanel = new LayoutContainer(new AccordionLayout());
    		filtrosPanel.setSize(300, 600);
    		filtrosPanel.setBorders(true);
    		filtrosPanel.setScrollMode(Scroll.AUTOY);
    		filtrosPanel.setId("acordeonFiltros");
    		
    		// First panel
    		ContentPanel filtroPanel = new ContentPanel(new RowLayout());
    		filtroPanel.setAnimCollapse(false);
    		filtroPanel.setSize(300, 600);
    		filtroPanel.setHeading("Testing grid");
    		
    		List<Stock> stocks = TestData.getStocks(); 
    		
    		List<ColumnConfig> configs = new ArrayList<ColumnConfig>();  
    		  
    	    final CheckBoxSelectionModel<Stock> sm = new CheckBoxSelectionModel<Stock>();  
    	    
    	    configs.add(sm.getColumn());  
    	    
    	    ColumnConfig column = new ColumnConfig();  
    	    column.setId("name");  
    	    column.setHeader("Company");  
    	    column.setWidth(240);  
    	    configs.add(column);  
    	    
    	    ListStore<Stock> store = new ListStore<Stock>();  
    	    store.add(stocks); 
    	    
    	    ColumnModel cm = new ColumnModel(configs); 
    	    
    	    Grid<Stock> grid = new Grid<Stock>(store, cm);
    	    grid.setSelectionModel(sm);
    	    grid.addPlugin(sm); 
    	    grid.getView().setAutoFill(true);
    
    	    filtroPanel.add(grid, new RowData(1,1)); 
    		filtrosPanel.add(filtroPanel);
    		
    		popUpContent.add(filtrosPanel);
    		popUp.add(popUpContent);
    		
    		popUp.show();
    	}
    }

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


    That testcase renders fine for me against 2.2 RC1

  10. #10
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default


    Well then I don't know what's going on... in my project the same code but with different datas doesn't render if I doesn't use setHeight.
    Anyway, at least giving a height it works .

    I am using Chrome and I made tests with Firefox too, I don't think is a navigator problem, but just in case I suggest it.

    If I find out something new I will make you know.

    Thanks sven.

Similar Threads

  1. CheckboxSelectionModel doesn't have 'beforerowDEselect' event?
    By zaqwsxqwer in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 30 Oct 2009, 3:04 AM
  2. Ext Grid Taking too Much time to paint 100 columns
    By amitdahiya10 in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 21 Aug 2008, 8:05 AM
  3. THE grid doesn't work in table
    By looksun in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 28 Jun 2007, 6:38 PM
  4. After rendering grid, loadData doesn't paint new records
    By booshan in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Apr 2007, 2:15 PM

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