1. #1
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    0
    fother is on a distinguished road

      0  

    Default NullPointer in CollumnFooter

    NullPointer in CollumnFooter


    change the code for this..

    Code:
    public class AggregationGridExample extends LayoutContainer {
    
    	@Override
    	protected void onRender(Element parent, int index) {
    		super.onRender(parent, index);
    
    		setLayout(new FlowLayout(15));
    
    		List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
    
    		ColumnConfig column = new ColumnConfig();
    		column.setId("name");
    		column.setHeader("Company");
    		column.setWidth(200);
    		column.setToolTip("sfsdf");
    		configs.add(column);
    
    		column = new ColumnConfig();
    		column.setId("last");
    		column.setHeader("Last");
    		column.setAlignment(HorizontalAlignment.RIGHT);
    		column.setWidth(100);
    		configs.add(column);
    
    		column = new ColumnConfig("date", "Last Updated", 100);
    		column.setAlignment(HorizontalAlignment.RIGHT);
    		column.setDateTimeFormat(DateTimeFormat.getShortDateFormat());
    		configs.add(column);
    
    		final ListStore<Stock> store = new ListStore<Stock>();
    		store.add(new ArrayList<Stock>());
    
    		ColumnModel cm = new ColumnModel(configs);
    
    		AggregationRowConfig<Stock> totals = new AggregationRowConfig<Stock>();
    		totals.setHtml("name", "Average");
    
    		totals.setSummaryType("last", SummaryType.AVG);
    		totals.setSummaryFormat("last", NumberFormat.getCurrencyFormat());
    
    		cm.addAggregationRow(totals);
    
    		Grid<Stock> grid = new Grid<Stock>(store, cm);
    		grid.setBorders(false);
    		grid.setAutoExpandColumn("name");
    		grid.setBorders(true);
    
    		add(grid);
    	}
    }
    stacktrace
    HTML Code:
    [ERROR] Uncaught exception escaped
    java.lang.NullPointerException: null
    	at com.extjs.gxt.ui.client.widget.grid.ColumnFooter.refresh(ColumnFooter.java:221)
    	at com.extjs.gxt.ui.client.widget.grid.ColumnFooter.onRender(ColumnFooter.java:173)
    	at com.extjs.gxt.ui.client.widget.Component.render(Component.java:892)
    	at com.extjs.gxt.ui.client.widget.Component.onAttach(Component.java:1425)

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,753
    Vote Rating
    113
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    That is already fixed in SVN

  3. #3
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    0
    fother is on a distinguished road

      0  

    Default