JavaScriptException: (TypeError): Object [object Object] has no method 'setAutoDraw'

Hi :slight_smile:

I have a form which is bound to a datasource and I am trying to put it in a VStack and show it in my entry point. My code looks like…

public class PatientView extends VStack {

	public PatientView() {

	    DynamicForm f = new DynamicForm();

	    f.setDataSource(new PatientDS());
	    f.setUseAllDataSourceFields(true);

	    setHeight100();
	    setWidth100();

	    addMember(f);
    
	}
	
}

public class NHiT implements EntryPoint {

	public void onModuleLoad() {
		
		PatientView v = new PatientView();
		v.draw();
		
	}
		
}

When I run the page I get the following error:

07:01:05.311 [ERROR] [nhit] Unable to load module entry point class nhit.client.NHiT (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object Object] has no method 'setAutoDraw'
 stack: TypeError: Object [object Object] has no method 'setAutoDraw'
    at unknown source
    at __gwt_jsInvoke (http://localhost:8888/nhit/hosted.html?nhit:70:35)
    at http://localhost:8888/nhit/hosted.html?nhit:263:16
    at z (http://localhost:8888/nhit/nhit.nocache.js:2:136)
    at http://localhost:8888/nhit/nhit.nocache.js:8:43
 type: undefined_method
 arguments: setAutoDraw,[object Object]
 __gwt_ObjectId: 1
    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.widgets.BaseWidget.init(BaseWidget.java)
    at com.smartgwt.client.widgets.BaseWidget.<clinit>(BaseWidget.java:46)
    at nhit.client.NHiT.onModuleLoad(NHiT.java:11)
    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 com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Unknown Source)

I’m totally stumped by this - I’ve been using SmartGWT for a few months now and I’ve never seen this before. Can anyone shed any light on what I’m doing wrong?

Thanks

(woooo first post)

PS: This is a repost of http://forums.smartclient.com/showthread.php?t=11006 - I got it in the wrong forum the first time - sorry!!