Isomorphic SmartClient/SmartGWT Framework (v9.1p_2014-03-26/PowerEdition Deployment 2014-03-26)
Moving from SmartGWT 4.0. to 4.1, I've come across an exception being thrown when calling getType() on a datasource field.
The field in the ds.xml looks like this:
The code on the client looks like this:
It looks like pre-4.1, this call would return null for a "number" fieldtype. Now it is throwing an exception.
The call to currentField.getType() throws the following exception:
This snippet from the trace log shows that 'number' is in the list of SimpleTypes from the builtinTypes.xml
Should the FieldType returned be FieldType.INTEGER since "number" inherits from "integer"?
Moving from SmartGWT 4.0. to 4.1, I've come across an exception being thrown when calling getType() on a datasource field.
The field in the ds.xml looks like this:
Code:
<field primaryKey="true" name="my_id" type="number" hidden="true"></field>
Code:
final DataSourceField[] dataSourceFields = dataSource.getFields(); for ( final DataSourceField currentField : dataSourceFields ) { FieldType type = currentField.getType(); ... snip other code ... }
The call to currentField.getType() throws the following exception:
Code:
com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.smartgwt.client.core.BaseClass::getAttributeAsString(Ljava/lang/String;)([string: 'inheritsFrom']): widget.getPropertyValue is not a function at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:487) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:724) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.smartgwt.client.core.BaseClass::getAttributeAsString(Ljava/lang/String;)([string: 'inheritsFrom']): widget.getPropertyValue is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.core.BaseClass.getAttributeAsString(BaseClass.java) at com.smartgwt.client.data.SimpleType.getInheritsFrom(SimpleType.java:283) at com.smartgwt.client.data.DataSourceField.getType(DataSourceField.java:2698)
Code:
DEBUG,03/26/2014 14:46:41:732,com.isomorphic.xml.XML,Parsed XML from __USE_CONTAINER__/app/sc/system/schema/builtinTypes.xml: 7ms, INFO,03/26/2014 14:46:41:774,com.isomorphic.pool.PoolManager,SmartClient pooling started for 'simpleTypes' objects, DEBUG,03/26/2014 14:46:41:774,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'simpleTypes', DEBUG,03/26/2014 14:46:41:814,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'Object', DEBUG,03/26/2014 14:46:41:825,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'any', DEBUG,03/26/2014 14:46:41:830,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'boolean', DEBUG,03/26/2014 14:46:41:831,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'integer', DEBUG,03/26/2014 14:46:41:832,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'float', DEBUG,03/26/2014 14:46:41:833,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'date', DEBUG,03/26/2014 14:46:41:834,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'time', DEBUG,03/26/2014 14:46:41:835,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'text', DEBUG,03/26/2014 14:46:41:836,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'string', DEBUG,03/26/2014 14:46:41:837,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'link', DEBUG,03/26/2014 14:46:41:838,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'int', DEBUG,03/26/2014 14:46:41:839,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'long', DEBUG,03/26/2014 14:46:41:840,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'number', DEBUG,03/26/2014 14:46:41:842,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'decimal', DEBUG,03/26/2014 14:46:41:844,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'double', DEBUG,03/26/2014 14:46:41:845,com.isomorphic.pool.ISCKeyedObjectPool,Borrowing object for 'dateTime',
Comment