Hello,
I'm creating a custom Dynamic Form, attached an enterprise Datasource to it which consists of fields with custom types and editors.
After setting the datasource, I do getFields on the Form and create a new array of only items I want in the form and in the order I want them to be. (sidequestion: I noted here that I don't get the right class of the items via getFields, they are all of class FormItem instead of TextItem, ComboboxItem, ... is that normal?)
When setting those items back onto the form I get the following error. I've been searching for such a "destroyed" item and with the help of the stacktrace, I found that the items that give this error are only my custom items: they do have an icon, but it's not disabled. And this procedure does work for all other items not having such an icon.
Any hints on where to search for the cause of this error? Thanks.
Attached is a log of the FormItem as jsObject and the JS stacktrace.
SmartGWT 2.3 EE
SmartClient Version: SC_SNAPSHOT-2010-08-03/EVAL Deployment (expires 2010.10.02_09.35.33)
I'm creating a custom Dynamic Form, attached an enterprise Datasource to it which consists of fields with custom types and editors.
After setting the datasource, I do getFields on the Form and create a new array of only items I want in the form and in the order I want them to be. (sidequestion: I noted here that I don't get the right class of the items via getFields, they are all of class FormItem instead of TextItem, ComboboxItem, ... is that normal?)
When setting those items back onto the form I get the following error. I've been searching for such a "destroyed" item and with the help of the stacktrace, I found that the items that give this error are only my custom items: they do have an icon, but it's not disabled. And this procedure does work for all other items not having such an icon.
Any hints on where to search for the cause of this error? Thanks.
Attached is a log of the FormItem as jsObject and the JS stacktrace.
Code:
[20100907 09:24:04] 09:24:04.463:MUP5:WARN:Log:TextItem{eventParent: [DynamicForm ID:isc_zzzDynamicForm_1], containerWidget: [DynamicForm ID:isc_zzzDynamicForm_1], form: [DynamicForm ID:isc_zzzDynamicForm_1], crud: "15", javaClass: "zzz.parameter.zzzMCurrency", name: "amount", required: true, zzzId: "1216", title: "Amount", type: "zzzMCurrency", validators: Array[2], editorType: "TextItem", editorProperties: Obj, iconPrompt: "Change value", selectOnFocus: true, icons: Array[1], ID: "isc_TextItem_2", prompt: "amount", } [20100907 09:24:04] 09:24:04.484:MUP5:WARN:DynamicForm:isc_zzzDynamicForm_1:destroyed FormItem passed to setItems()/addItem(): FormItems cannot be re-used with different DynamicForms com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'isDisabled' of null stack: TypeError: Cannot call method 'isDisabled' of null at Object.isc_FormItem_isDisabled [as isDisabled] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:1414:84) at Object.isc_FormItem_iconIsDisabled [as iconIsDisabled] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:1423:213) at Object.isc_FormItem__setUpIcon [as $36c] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:1048:72) at Object.isc_FormItem__setUpIcons [as $14v] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:1047:133) at Object.isc_FormItem_init (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:782:138) at Object.isc_c_Class_invokeSuper [as invokeSuper] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Core.js:301:76) at Object.isc_c_Class_Super [as Super] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Core.js:293:157) at Object.isc_TextItem_init [as init] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:1778:47) at Object.isc_Class_completeCreation [as completeCreation] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Core.js:360:6) at Object.isc_DynamicForm_createItem [as createItem] (http://127.0.0.1:8888/zzz/sc/modules/ISC_Forms.js:302:84) type: non_object_property_call arguments: isDisabled, __gwt_ObjectId: 2643
SmartClient Version: SC_SNAPSHOT-2010-08-03/EVAL Deployment (expires 2010.10.02_09.35.33)
Comment