The following version’s I am using
IE 7 Version 7.0.5730.13
GWT SDK Version 2.1.1
JDK 1.6
Issue Information:
In my code I am having one DynamicForm which is consisting of some TextItem and SelectItem fields.
Even if I used or not used setRequired (true) for the form fields. But when I try to call form.validate(), the below error is coming. This error is causing because of the below code in the JSOHelper.class under smartgwt.jar.
Note:
In the previous GWT SDK version 2.0.x, I have not faced this issue. After upgrading to the latest version I am facing the below issue .
As per my project requirements i need to validate the form fields. I am not sure why this issue raised in this version GWT 2.1.1.
Please help me.
The below method is called under JSOHelper.class, when form.validate method is called from client.
public static Map convertToMap(JavaScriptObject jsObj, boolean listAsArray) {
Object javaObj = convertToJava(jsObj, listAsArray);
if (javaObj instanceof Map) {
return (Map) javaObj;
} else {
throw new IllegalArgumentException("convertToMap - unable to convert JavaScript object passed in to a Map"
+ SC.echo(jsObj));
}
}
Error Console Info:
java.lang.IllegalArgumentException: convertToMap - unable to convert JavaScript object passed in to a Map{type: "custom",
condition: anonymous()}
at com.smartgwt.client.util.JSOHelper.convertToMap(JSOHelper.java:483)
at com.smartgwt.client.util.JSOHelper.convertToMap(JSOHelper.java:495)
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.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.form.DynamicForm.validate(DynamicForm.java)
at com.fisglobal.gwt.base.client.sepadd.debtorBankMandate.incomingSdd.ReturnRefundIncomingSddPanel.validateReturnIncomingSDDAddPanel(ReturnRefundIncomingSddPanel.java:662)
at com.fisglobal.gwt.base.client.sepadd.debtorBankMandate.incomingSdd.ReturnRefundIncomingSddPanel$4.onClick(ReturnRefundIncomingSddPanel.java:624)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:98)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:204)
at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:103)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:101)
at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
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.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.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.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)
IE 7 Version 7.0.5730.13
GWT SDK Version 2.1.1
JDK 1.6
Issue Information:
In my code I am having one DynamicForm which is consisting of some TextItem and SelectItem fields.
Even if I used or not used setRequired (true) for the form fields. But when I try to call form.validate(), the below error is coming. This error is causing because of the below code in the JSOHelper.class under smartgwt.jar.
Note:
In the previous GWT SDK version 2.0.x, I have not faced this issue. After upgrading to the latest version I am facing the below issue .
As per my project requirements i need to validate the form fields. I am not sure why this issue raised in this version GWT 2.1.1.
Please help me.
The below method is called under JSOHelper.class, when form.validate method is called from client.
public static Map convertToMap(JavaScriptObject jsObj, boolean listAsArray) {
Object javaObj = convertToJava(jsObj, listAsArray);
if (javaObj instanceof Map) {
return (Map) javaObj;
} else {
throw new IllegalArgumentException("convertToMap - unable to convert JavaScript object passed in to a Map"
+ SC.echo(jsObj));
}
}
Error Console Info:
java.lang.IllegalArgumentException: convertToMap - unable to convert JavaScript object passed in to a Map{type: "custom",
condition: anonymous()}
at com.smartgwt.client.util.JSOHelper.convertToMap(JSOHelper.java:483)
at com.smartgwt.client.util.JSOHelper.convertToMap(JSOHelper.java:495)
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.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.form.DynamicForm.validate(DynamicForm.java)
at com.fisglobal.gwt.base.client.sepadd.debtorBankMandate.incomingSdd.ReturnRefundIncomingSddPanel.validateReturnIncomingSDDAddPanel(ReturnRefundIncomingSddPanel.java:662)
at com.fisglobal.gwt.base.client.sepadd.debtorBankMandate.incomingSdd.ReturnRefundIncomingSddPanel$4.onClick(ReturnRefundIncomingSddPanel.java:624)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:98)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:204)
at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:103)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:101)
at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
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.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.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.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)
Comment