Hi Isomorphic,
I prepare the migration to SmartGWT 6.0.
Here is the version I used : SmartClient Version: v11.0p_2016-08-12/LGPL Development Only (built 2016-08-12).
The issue appears for all comboboxes with optionDataSource, with valueField the integer pk field of the optionDataSource and the displayField a string field of the optionDataSource .
The combobox must already have a value.
When i click on the comboBoxItem (with a value), the pick list opened and than i got an error message.
I can not reproduce it with client datasources.
I've tried a lot of settings of the ComboBox to determine which is the one that cause me trouble.
Can you give me any hint, where to look at ?
Un isolated test case is this, but is not a standalone one because UserDS is server side DS.
On dev mode i got this error
On compile mode i got this
On compile mode, dev center, i got this
Thanks in advance for your help.
I prepare the migration to SmartGWT 6.0.
Here is the version I used : SmartClient Version: v11.0p_2016-08-12/LGPL Development Only (built 2016-08-12).
The issue appears for all comboboxes with optionDataSource, with valueField the integer pk field of the optionDataSource and the displayField a string field of the optionDataSource .
The combobox must already have a value.
When i click on the comboBoxItem (with a value), the pick list opened and than i got an error message.
I can not reproduce it with client datasources.
I've tried a lot of settings of the ComboBox to determine which is the one that cause me trouble.
Can you give me any hint, where to look at ?
Un isolated test case is this, but is not a standalone one because UserDS is server side DS.
Code:
ComboBoxItem userComboItem = new ComboBoxItem("userId", "User"); userComboItem.setOptionDataSource(UserDS.getInstance()); userComboItem.setValueField(UserDS.UTI_ID); userComboItem.setDisplayField(UserDS.UTI_NOM); DataSource formDS = new DataSource(); formDS.setClientOnly(true); formDS.setFields(new DataSourceField("pk", FieldType.INTEGER), new DataSourceField("userId", FieldType.INTEGER)); DynamicForm form = new DynamicForm(); form.setDataSource(formDS); form.setItems(userComboItem); form.setColWidths(1, 350); addMember(form); Map<String, Object> initValues = new HashMap<String, Object>(); initValues.put("userId", 2); form.editNewRecord(initValues);
On dev mode i got this error
Code:
Cannot cast java.lang.Integer to java.lang.String java.lang.Class.cast(Class.java:3176) com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:163) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) com.smartgwt.client.data.DataSource.processResponse(DataSource.java)
On compile mode i got this
Code:
lineNumber: 14857 columnNumber: 27: a.indexOf is not a function Unknown.vBs(Unknown Source) Unknown.CUo(Unknown Source) Unknown.BUo(Unknown Source) Unknown.Z1r(Unknown Source) Unknown.X1r/$wnd.isc.NumberUtil.parseFloat(Unknown Source) Unknown.isc.builtinTypes.integer.parseInput(Unknown Source) Unknown.isc_FormItem__parseDisplayValue(Unknown Source) Unknown.isc_TextItem_mapDisplayToValue(Unknown Source) Unknown.isc_c_Class_invokeSuper(Unknown Source) Unknown.isc_ComboBoxItem_mapDisplayToValue(Unknown Source) Unknown.isc_ComboBoxItem__updateValue(Unknown Source) Unknown.isc_FormItem_updateValue(Unknown Source) Unknown..$19v(Unknown Source) Unknown..handleDataArrived(Unknown Source) Unknown..$19n/<.dataArrived(Unknown Source) Unknown.isc_ListGrid__dataArrived(Unknown Source) Unknown.isc_ListGrid__observeData/<(Unknown Source) Unknown.observation(Unknown Source) Unknown.isc_ResultSet__doneDataArriving(Unknown Source) Unknown.isc.A.fetchRemoteDataReply(Unknown Source) Unknown.isc_c_Class_invokeSuper(Unknown Source) Unknown.isc_c_Class_Super(Unknown Source)
Code:
13:55:39.558:IBLR0:WARN:Log:TypeError: a.indexOf is not a function Stack from error.stack: vBs() @ acquityCX/512BDC5CA1693542DDB0E2FC94611F1A.cache.html:14857 CUo() @ acquityCX/512BDC5CA1693542DDB0E2FC94611F1A.cache.html:24669 BUo() @ acquityCX/512BDC5CA1693542DDB0E2FC94611F1A.cache.html:18494 Z1r() @ acquityCX/512BDC5CA1693542DDB0E2FC94611F1A.cache.html:21341 X1r/$wnd.isc.NumberUtil.parseFloat() @ acquityCX/512BDC5CA1693542DDB0E2FC94611F1A.cache.html:25133 isc.builtinTypes.integer.parseInput() @ acquityCX/sc/modules/ISC_Foundation.js:796 FormItem._parseDisplayValue() @ acquityCX/sc/modules/ISC_Forms.js:947 TextItem.mapDisplayToValue() @ acquityCX/sc/modules/ISC_Forms.js:1711 Class.invokeSuper() @ acquityCX/sc/modules/ISC_Core.js:273 ComboBoxItem.mapDisplayToValue() @ acquityCX/sc/modules/ISC_Forms.js:2487 ComboBoxItem._updateValue() @ acquityCX/sc/modules/ISC_Forms.js:2425 FormItem.updateValue() @ acquityCX/sc/modules/ISC_Forms.js:1063 FormItem.elementChanged() @ acquityCX/sc/modules/ISC_Forms.js:1157 DynamicForm.bubbleItemHandler() @ acquityCX/sc/modules/ISC_Forms.js:530 DynamicForm.elementChanged() @ acquityCX/sc/modules/ISC_Forms.js:531 TextItem._nativeElementBlur() @ acquityCX/sc/modules/ISC_Forms.js:1692 FormItem.._nativeBlurHandler() @ acquityCX/sc/modules/ISC_Forms.js:642 FormItem._nativeBlurHandler() @ acquityCX/sc/modules/ISC_Forms.js:641 Canvas.setFocus() @ acquityCX/sc/modules/ISC_Core.js:2924 Canvas.focus() @ acquityCX/sc/modules/ISC_Core.js:2926 [c]EventHandler.doHandleMouseDown() @ acquityCX/sc/modules/ISC_Core.js:1505 [c]EventHandler.handleMouseDown() @ acquityCX/sc/modules/ISC_Core.js:1494 [c]EventHandler.dispatch() @ acquityCX/sc/modules/ISC_Core.js:1783 anonymous() @ acquityCX/sc/modules/ISC_Core.js:58
Comment