I'm working on a dialog (extending BaseDialog) with a TabSet form layout split into several tabs, basically as described in <a href="http://www.smartclient.com/smartgwt/showcase/#layout_form_splitting">the gwt showcase</a>.
The GUI itself works fine, I also can use a ValuesManager and provide data via ValuesManager.setValues(...).
What does not work is - instead of using setValues(...) - connecting the form to a datasource via a ValuesManager as described in
<a href="http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#class..ValuesManager">the smartclient docs</a>.
I tried to connect the skeleton from the documentation to a datasource like this:
All this works, but when I call
to write the data from the datasource to the form fields, I get a ClassCastException (which is added to the end of this message).
I was able to debug it to the method invocation, and it seems that within my call to ValuesManager.fetchData(...), the method
is executed on my instance of ValuesManager in
ValuesManager is not of type BaseWidget but only extends class com.smartgwt.client.core.BaseClass.
Any ideas about this? Is the setup of the values manager wrong for this case?
kind regards
This is the part of the stack trace.
The GUI itself works fine, I also can use a ValuesManager and provide data via ValuesManager.setValues(...).
What does not work is - instead of using setValues(...) - connecting the form to a datasource via a ValuesManager as described in
<a href="http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#class..ValuesManager">the smartclient docs</a>.
I tried to connect the skeleton from the documentation to a datasource like this:
Code:
ValuesManager vm = new ValuesManager(); vm.setDataSource(dataSource); myFormOne.setDataSource(dataSource); myFormTwo.setDataSource(dataSource); vm.addMember(myFormOne); vm.addMember(myFormTwo);
Code:
vm.fetchData()
I was able to debug it to the method invocation, and it seems that within my call to ValuesManager.fetchData(...), the method
Code:
public com.google.gwt.core.client.JavaScriptObject com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj()
Code:
com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
Any ideas about this? Is the setup of the values manager wrong for this case?
kind regards
This is the part of the stack trace.
Code:
description: java.lang.IllegalArgumentException: java.lang.ClassCastException@8c0a3b at sun.reflect.GeneratedMethodAccessor8.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.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126) at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155) at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294) at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117) at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method) at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64) at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493) at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417) at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:67) at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:152) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:447) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:248) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at com.smartgwt.client.widgets.form.ValuesManager.fetchData(ValuesManager.java) at com.ect.effective.gwt.vcb.client.dlg.PromptDialog.<init>(PromptDialog.java:77) at com.ect.effective.gwt.vcb.client.dlg.DialogFactory.createDialog(DialogFactory.java:28)
Comment