Browser: any
SmartGwtVersion: Smart GWT LGPL Edition (2014-04-09 nightly)
SmartClient Version: v9.1p_2014-04-08/LGPL Development Only (built 2014-04-08)
Today I've downloaded the latest nightly build of SmartGwt 4.1p and I had the following exception during data loading
I followed instructions of this thread, without any success.
After many experiments, I found that adding a call to super.transformRequest() within the overridden method made everything work like a charm.
That override of RestDataSource.transformRequest() method without calling super implementation was perfectly working with SmartGWT versions prior to 4.1.
This seems a breaking change people should be aware of. Maybe the javadoc should be updated, highlighting that custom implementations must still invoke the superclass implementation of transformRequest().
So is there any better way to workaround this issue?
Follows an excerpt from a standalone test case, just to ease reproducing the issue.
SmartGwtVersion: Smart GWT LGPL Edition (2014-04-09 nightly)
SmartClient Version: v9.1p_2014-04-08/LGPL Development Only (built 2014-04-08)
Today I've downloaded the latest nightly build of SmartGwt 4.1p and I had the following exception during data loading
Uncaught exception escaped : com.google.gwt.core.client.JavaScriptException
(TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)
([JavaScript object(57), JavaScript object(54), JavaScript object(132)]): _3.selectString is not a function
See the Development console log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.
(TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)
([JavaScript object(57), JavaScript object(54), JavaScript object(132)]): _3.selectString is not a function
See the Development console log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.
After many experiments, I found that adding a call to super.transformRequest() within the overridden method made everything work like a charm.
That override of RestDataSource.transformRequest() method without calling super implementation was perfectly working with SmartGWT versions prior to 4.1.
This seems a breaking change people should be aware of. Maybe the javadoc should be updated, highlighting that custom implementations must still invoke the superclass implementation of transformRequest().
So is there any better way to workaround this issue?
Follows an excerpt from a standalone test case, just to ease reproducing the issue.
Code:
... final RestDataSource dataSource = new RestDataSource() { @Override protected Object transformRequest( com.smartgwt.client.data.DSRequest dsRequest) { // super.transformRequest(dsRequest); //UNCOMMENTING THIS, IT WORKS return dsRequest.getData(); } }; dataSource.setDataFormat(DSDataFormat.JSON); dataSource.setDataURL("gwt/data.js"); // datasource fields initialization { final DataSourceIntegerField keyField = new DataSourceIntegerField( "id", "ID"); keyField.setPrimaryKey(true); final DataSourceTextField nameField = new DataSourceTextField( "name", "Name"); dataSource.setFields(keyField, nameField); } dataSource.fetchData(new Criteria()); ...
Comment