Hello,

I have just started using Ext GWT, hence, please this post as GreenHorn's query

I went through the below example :

http://www.sencha.com/examples/pages...idfilters.html

Now,I am trying to create a simple grid to get the grasp of working of the Grid :

Code:

package com.mycompany.project.client;

import java.util.ArrayList;
import java.util.List;

import com.extjs.gxt.ui.client.Style.LayoutRegion;
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.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.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;

public class Salary extends LayoutContainer {

public Salary() {
setLayout(new BorderLayout());

/* The ContentPanel that will hold the central data grid */
ContentPanel centralCp = new ContentPanel();
centralCp.setHeading("New ContentPanel");
centralCp.setCollapsible(true);
add(centralCp, new BorderLayoutData(LayoutRegion.CENTER));

/* Store creation */
ListStore<SalaryComponent> store = new ListStore<SalaryComponent>();
store.add(TestData.getSalComponents());

/* Column creation */
ColumnConfig cmpCodeConfig = new ColumnConfig("cmpCode",
"Component Code", 10);

/* Add all the columns to a List */
List<ColumnConfig> columnConfigList = new ArrayList<ColumnConfig>();
columnConfigList.add(cmpCodeConfig);

/* ColumnModel creation to hold columns */
ColumnModel cm = new ColumnModel(columnConfigList);

/* Creating the Grid */
Grid<SalaryComponent> centralDataGrid = new Grid<SalaryComponent>(
store, cm);
centralDataGrid.getView().setForceFit(true);

/* Start : Problem zone */
//centralCp.add(centralDataGrid);
}

}


The moment I attempt to add the Grid to the ContentPanel, I get an exception in the Designer view :

GWT Designer encountered unexpected internal error.
This could be caused by a GWT Designer bug or by a misconfiguration issue, conflict, partial update, etc.
org.mvel2.PropertyAccessException: grid.getView().getHeaderCell(index): null


The complete stack trace is as shown below :



java.lang.NullPointerException at com.extjs.gxt.ui.client.widget.grid.GridView.getHeaderCell(GridView.java:389) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:954) at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:313) at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:136) at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:134) at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85) at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:103) at org.mvel2.MVEL.executeExpression(MVEL.java:1069) at org.eclipse.wb.internal.core.model.util.ScriptUtils.evaluate(ScriptUtils.java:146) at org.eclipse.wb.internal.core.model.util.ScriptUtils.evaluate(ScriptUtils.java:133) at com.google.gdt.eclipse.designer.gxt.model.widgets.GridInfo.refresh_fetch(GridInfo.java:87) at org.eclipse.wb.core.model.ObjectInfo.refresh_fetch(ObjectInfo.java:645) at com.google.gdt.eclipse.designer.model.widgets.UIObjectInfo.refresh_fetch(UIObjectInfo.java:320) at org.eclipse.wb.core.model.ObjectInfo.refresh_fetch(ObjectInfo.java:645) at com.google.gdt.eclipse.designer.model.widgets.UIObjectInfo.refresh_fetch(UIObjectInfo.java:320) at org.eclipse.wb.core.model.ObjectInfo$6$1.run(ObjectInfo.java:496) at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:139) at org.eclipse.wb.core.model.ObjectInfo$6.run(ObjectInfo.java:494) at org.eclipse.wb.core.model.ObjectInfo.execRefreshOperation(ObjectInfo.java:514) at org.eclipse.wb.core.model.ObjectInfo.refresh(ObjectInfo.java:492) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:559) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:402) at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381) at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:248) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:226) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2743) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1429) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) Full context stack trace:


[Error: grid.getView().getHeaderCell(index): null] [Near : {... Unknown ....}] ^ [Line: 1, Column: 0] at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:371) at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:136) at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:134) at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85) at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:103) at org.mvel2.MVEL.executeExpression(MVEL.java:1069) at org.eclipse.wb.internal.core.model.util.ScriptUtils.evaluate(ScriptUtils.java:146) at org.eclipse.wb.internal.core.model.util.ScriptUtils.evaluate(ScriptUtils.java:133) at com.google.gdt.eclipse.designer.gxt.model.widgets.GridInfo.refresh_fetch(GridInfo.java:87) at org.eclipse.wb.core.model.ObjectInfo.refresh_fetch(ObjectInfo.java:645) at com.google.gdt.eclipse.designer.model.widgets.UIObjectInfo.refresh_fetch(UIObjectInfo.java:320) at org.eclipse.wb.core.model.ObjectInfo.refresh_fetch(ObjectInfo.java:645) at com.google.gdt.eclipse.designer.model.widgets.UIObjectInfo.refresh_fetch(UIObjectInfo.java:320) at org.eclipse.wb.core.model.ObjectInfo$6$1.run(ObjectInfo.java:496) at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:139) at org.eclipse.wb.core.model.ObjectInfo$6.run(ObjectInfo.java:494) at org.eclipse.wb.core.model.ObjectInfo.execRefreshOperation(ObjectInfo.java:514) at org.eclipse.wb.core.model.ObjectInfo.refresh(ObjectInfo.java:492) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:559) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:402) at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381) at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:248) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:226) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2743) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1429) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:954) at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:313) ... 58 more Caused by: java.lang.NullPointerException at com.extjs.gxt.ui.client.widget.grid.GridView.getHeaderCell(GridView.java:389) ... 64 more

Please guide on the same

Thanks !