Hi All --
I am using datasource.addData for the first time (see code below), but am getting an uncaught exception for some reason. I have seen some posts about similar exceptions elsewhere, but nothing on this specific issue that I can find.
The line that causes the exception is this one:
poTermsDS.addData(newCondition, new DSCallback() { ...
Can anyone help/advise?
Thanks.
IButton saveButton = new IButton("Save");
saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
DSRequest req = new DSRequest();
req.setParams(getExtras());
poHeaderValuesManager.saveData(new DSCallback() {
@Override
public void execute(DSResponse response,
Object rawData, DSRequest request) {
if (response.getStatus()==DSResponse.STATUS_SUCCESS)
poHeaderEditWindow.hide();
}
}, req);
for (ListGridRecord termRecord : getConditionsGrid().getSelection()) {
Record newCondition = new Record();
newCondition.setAttribute("PFGP", fileGroupSelect.getValue());
newCondition.setAttribute("PONO", poHeaderValuesManager.getValues().get("HONO"));
newCondition.setAttribute("termID", termRecord.getAttribute("id"));
if (termRecord.getAttribute("Value") != null)
newCondition.setAttribute("Value", termRecord.getAttribute("Value"));
DSRequest userUIRequest = new DSRequest();
poTermsDS.addData(newCondition, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData,
DSRequest request) {
if (response.getStatus() != RPCResponse.STATUS_SUCCESS) {
SC.warn("Error saving PO.");
return;
}
}
}, userUIRequest);
}
}
});
14:12:40.469 [ERROR] [ipgui] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (null): null
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.data.DataSource.addData(DataSource.java)
at com.islandpacific.gui.client.PoHeaderCanvas$10.onClick(PoHeaderCanvas.java:374)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:96)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
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.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
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:188)
at sun.reflect.GeneratedMethodAccessor244.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.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:637)
I am using datasource.addData for the first time (see code below), but am getting an uncaught exception for some reason. I have seen some posts about similar exceptions elsewhere, but nothing on this specific issue that I can find.
The line that causes the exception is this one:
poTermsDS.addData(newCondition, new DSCallback() { ...
Can anyone help/advise?
Thanks.
IButton saveButton = new IButton("Save");
saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
DSRequest req = new DSRequest();
req.setParams(getExtras());
poHeaderValuesManager.saveData(new DSCallback() {
@Override
public void execute(DSResponse response,
Object rawData, DSRequest request) {
if (response.getStatus()==DSResponse.STATUS_SUCCESS)
poHeaderEditWindow.hide();
}
}, req);
for (ListGridRecord termRecord : getConditionsGrid().getSelection()) {
Record newCondition = new Record();
newCondition.setAttribute("PFGP", fileGroupSelect.getValue());
newCondition.setAttribute("PONO", poHeaderValuesManager.getValues().get("HONO"));
newCondition.setAttribute("termID", termRecord.getAttribute("id"));
if (termRecord.getAttribute("Value") != null)
newCondition.setAttribute("Value", termRecord.getAttribute("Value"));
DSRequest userUIRequest = new DSRequest();
poTermsDS.addData(newCondition, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData,
DSRequest request) {
if (response.getStatus() != RPCResponse.STATUS_SUCCESS) {
SC.warn("Error saving PO.");
return;
}
}
}, userUIRequest);
}
}
});
14:12:40.469 [ERROR] [ipgui] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (null): null
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.data.DataSource.addData(DataSource.java)
at com.islandpacific.gui.client.PoHeaderCanvas$10.onClick(PoHeaderCanvas.java:374)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:96)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
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.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
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:188)
at sun.reflect.GeneratedMethodAccessor244.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.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:637)
Comment