Hi all,
I am having trouble using a custom editor in a grid.
(The editor is a subclass of StaticTextItem, with some added icons from functionality.)
The editor works OK when using in a DynamicForm, but I can not get it to work in ListGrids.
I am passing in the editor by calling setEditorType() on the relevant ListGridField.
When starting to edit, the editor is displayed OK (with the right value), but wget when calling getValue() in one of the icon click handlers, I get a JS exception:
Could you please help me what am I doing wrong?
(From the standpoint of implementing custom editors, what is the difference between using custom editors in ListGrids and DynamicForms?)
(This is SmartGWT-Power 2.3, FF 3.6, Linux)
I am having trouble using a custom editor in a grid.
(The editor is a subclass of StaticTextItem, with some added icons from functionality.)
The editor works OK when using in a DynamicForm, but I can not get it to work in ListGrids.
I am passing in the editor by calling setEditorType() on the relevant ListGridField.
When starting to edit, the editor is displayed OK (with the right value), but wget when calling getValue() in one of the icon click handlers, I get a JS exception:
Code:
Error: com.google.gwt.core.client.JavaScriptException: (TypeError): self.getValue is not a function fileName: http://127.0.0.1:8888 lineNumber: 486 stack: ()@http://127.0.0.1:8888:486 @:0 ([object GWTJavaObject],4325431,[object GWTJavaObject])@http://127.0.0.1:8888/orgtel/hosted.html?orgtel:56 ([object Object],[object Object],[object Object])@http://127.0.0.1:8888:15 ((function () {var param = {form: arguments[0], item: arguments[1], icon: arguments[2]};var event = __gwt_makeJavaInvoke(1)(null, 13500445, param);__gwt_makeJavaInvoke(1)(selfJ, 4325431, event);}),[object Object],[object Object])@http://127.0.0.1:8888:12 @:0 (null,65563,(function () {var param = {form: arguments[0], item: arguments[1], icon: arguments[2]};var event = __gwt_makeJavaInvoke(1)(null, 13500445, param);__gwt_makeJavaInvoke(1)(selfJ, 4325431, event);}),[object Object],[object Object])@http://127.0.0.1:8888/orgtel/hosted.html?orgtel:56 ([object Object],[object Object],[object Object])@http://127.0.0.1:8888:36 isc_FormItem__iconClick("_0")@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Forms.js:1382 isc_DynamicForm_handleClick([object Object],(void 0))@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Forms.js:650 isc_c_EventHandler_bubbleEvent([object Object],"click")@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1536 isc_c_EventHandler_handleClick([object Object])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1389 isc_c_EventHandler__handleMouseUp([object MouseEvent],(void 0))@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1376 isc_c_EventHandler_handleMouseUp([object MouseEvent])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1367 isc_c_EventHandler_dispatch(isc_c_EventHandler_handleMouseUp,[object MouseEvent])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:1599 anonymous([object MouseEvent])@http://127.0.0.1:8888/orgtel/sc/modules/ISC_Core.js:61 com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) com.smartgwt.client.widgets.form.fields.FormItem.getValue(FormItem.java) com.nolmecolindor.sgweet.client.widgets.data.linking.EntityLinkItem$3$1.onFormItemClickChecked(EntityLinkItem.java:69) com.nolmecolindor.sgweet.client.errorhandling.CheckedFormItemClickHandler.onFormItemClick(CheckedFormItemClickHandler.java:10) com.smartgwt.client.widgets.form.fields.events.FormItemIconClickEvent.dispatch(FormItemIconClickEvent.java:95) com.smartgwt.client.widgets.form.fields.events.FormItemIconClickEvent.dispatch(FormItemIconClickEvent.java:1) com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65) com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53) com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178) com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:197) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1714) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) com.google.gwt.core.client.impl.Impl.apply(Impl.java) com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) sun.reflect.GeneratedMethodAccessor528.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1669) com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) java.lang.Thread.run(Thread.java:619)
(From the standpoint of implementing custom editors, what is the difference between using custom editors in ListGrids and DynamicForms?)
(This is SmartGWT-Power 2.3, FF 3.6, Linux)
Comment