1. #1
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default NullPointer in BarDataProvider

    NullPointer in BarDataProvider


    change the content of the class for

    Code:
    public class AdvancedChartExample extends LayoutContainer {
    
    	public class Example extends BaseModel {
    
    		public Example(String month, Integer value) {
    			setMonth(month);
    			setValue(value);
    		}
    
    		public String getMonth() {
    			return get("month");
    		}
    
    		public Integer getValue() {
    			return get("value");
    		}
    
    		public void setMonth(String month) {
    			set("month", month);
    		}
    
    		public void setValue(Integer value) {
    			set("value", value);
    		}
    
    	}
    
    	@Override
    	protected void onRender(Element parent, int index) {
    		super.onRender(parent, index);
    
    		List<Example> examples = new ArrayList<Example>();
    		examples.add(new Example("Jan", 6));
    		examples.add(new Example("Fev", null));
    
    		final ListStore<Example> store = new ListStore<Example>();
    		store.add(examples);
    
    		// chart
    		String url = !Examples.isExplorer() ? "../../" : "";
    		url += "gxt/chart/open-flash-chart.swf";
    		final Chart chart = new Chart(url);
    
    		ChartModel model = new ChartModel("Title");
    		model.setBackgroundColour("#fefefe");
    		model.setLegend(new Legend(Position.TOP, true));
    		model.setScaleProvider(ScaleProvider.ROUNDED_NEAREST_SCALE_PROVIDER);
    
    		BarChart bar = new BarChart(BarStyle.GLASS);
    		bar.setColour("#00aa00");
    		BarDataProvider barProvider = new BarDataProvider("value", "month");
    		barProvider.bind(store);
    		bar.setDataProvider(barProvider);
    		model.addChartConfig(bar);
    
    		chart.setChartModel(model);
    
    		LayoutContainer lc = new LayoutContainer();
    		RowLayout rl = new RowLayout();
    		lc.setLayout(rl);
    		lc.setSize(800, 600);
    
    		RowData data;
    		data = new RowData(1, 300, new Margins(10));
    		ContentPanel cp = new ContentPanel(new FitLayout());
    		cp.setHeading("Chart");
    		cp.add(chart);
    		cp.setCollapsible(true);
    		lc.add(cp, data);
    
    		add(lc);
    
    	}
    }
    stacktrace
    HTML Code:
    java.lang.NullPointerException: null
    	at com.extjs.gxt.charts.client.model.BarDataProvider.populateData(BarDataProvider.java:52)
    	at com.extjs.gxt.charts.client.Chart.processModel(Chart.java:234)
    	at com.extjs.gxt.charts.client.Chart.setChartModel(Chart.java:168)

  2. #2
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default


    according to sven this "issue" its fixed in SVN...

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