I'm using SC_SNAPSHOT-2010-09-04/PowerEdition Deployment with Firefox 3.6.
When a user edits a new record and then expands that new record before hitting enter to save the edit, the follow exception is thrown:
I've attached a small program to reproduce what I am seeing:
Note this exception happens with or without the form that is displayed for the expanded record. For simplicity, I left off the form that is displayed in the record in the example reproducer.
And the PING.ds.xml:
I would expect the save to happen before the row expansion is fired and not generate an exception. Did I go about the code for this wrong?
When a user edits a new record and then expands that new record before hitting enter to save the edit, the follow exception is thrown:
Code:
12:31:50.240 [ERROR] [Ping] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (String): Invoking an instance method on a null instance
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:70)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:60)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:184)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
at com.smartgwt.client.widgets.grid.ListGrid.canExpandRecord(ListGrid.java)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
I've attached a small program to reproduce what I am seeing:
Code:
package com.smartgwt.sample.client;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VStack;
public class Ping implements EntryPoint
{
public void onModuleLoad()
{
final Canvas mainCanvas = new Canvas();
mainCanvas.setHeight100();
mainCanvas.setWidth100();
mainCanvas.setBackgroundColor("green");
final ListGrid grid = new ListGrid();
grid.setDataSource(DataSource.get("PING"));
grid.setWidth100();
grid.setHeight100();
grid.setCanExpandRecords(true);
grid.setCanRemoveRecords(true);
grid.fetchData();
final IButton newBtn = new IButton("new");
newBtn.enable();
newBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
grid.startEditingNew();
}
});
final HLayout hLayout = new HLayout(10);
hLayout.setMembersMargin(10);
hLayout.setHeight(22);
hLayout.addMember(newBtn);
final VStack vstack = new VStack();
vstack.setLeft(10);
vstack.setTop(10);
vstack.setWidth("80%");
vstack.setHeight("80%");
vstack.setMembersMargin(10);
vstack.addMember(grid);
vstack.addMember(hLayout);
mainCanvas.addChild(vstack);
mainCanvas.draw();
}
}
And the PING.ds.xml:
Code:
<DataSource schema="PING" dbName="Oracle" tableName="PING" ID="PING" serverType="sql" > <fields> <field sequenceName="PING_SEQ" primaryKey="true" name="id" type="sequence" hidden="true"></field> <field name="name" length="51" type="text"> <validators> <validator type="isUnique" requiresServer="true" /> </validators> </field> <field name="other" length="21" type="text"> </field> </fields> </DataSource>
Comment