I am using SmartGWT 3.0 LGPL Edition and encountered the following problem.
ListGrid with RestDataSource
CommonDataSource is descendant of RestDataSource. After adding 2 record in grid and calling grid.savaAllEdits(); CommonDataSource returns XML response on two merged requests, the following error occurs on the client side:
Uncaught JavaScript exception [this.$89g is not a function] in http://127.0.0.1:8888/tmorder/sc/mod...DataBinding.js, line 1250
17:50:48.617 [ERROR] [tmorder] 17:50:48.643:XRP3:WARN:Log:TypeError: this.$89g is not a function
RPCManager._performTransactionReply(2) @ tmorder/sc/modules/ISC_DataBinding.js:1250
[c]RPCManager.performTransactionReply(_1=>2, _2=>"<response><status>0</status><data><reco..."[ 407], _3=>undef) @ tmorder/sc/modules/ISC_DataBinding.js:1228
anonymous(2, [object XMLHttpRequest]) @ tmorder/sc/modules/ISC_Core.js:38
[c]Class.fireCallback(_1=>"isc.RPCManager.performTransactionReply(..."[ 67], _2=>"transactionNum,results,wd", _3=>[object Array]) @ tmorder/sc/modules/ISC_Core.js:301
[c]Comm.performXmlTransactionReply(_1=>2, _2=>[object XMLHttpRequest]) @ tmorder/sc/modules/ISC_Core.js:1268
anonymous([object XMLHttpRequest]) @ tmorder/sc/modules/ISC_Core.js:38
[c]Class.fireCallback(_1=>"isc.Comm.performXmlTransactionReply(2, ..."[ 56], _2=>"xmlHttpRequest", _3=>[object Array], _4=>[object Proxy], _5=>true) @ tmorder/sc/modules/ISC_Core.js:301
Comm._fireXMLCallback([object XMLHttpRequest], "isc.Comm.performXmlTransactionReply(2, ..."[ 56]) @ tmorder/sc/modules/ISC_Core.js:1244
unnamed([object Event]) @ tmorder/sc/modules/ISC_Core.js:1256
unnamed() @
Request postMessage:
Response:
Thus, if request (and response) consists of one element, then the error does not occur.
Then I try to use SmartGWT 3.0 EE Evaluation , and the error also does not occur. The difference between two edition is in generated file \com\smartclient\public\sc\modules\ISC_DataBinding.js.
Enterprise edititon has the following entries in this file with function name $89g:
And LGPL edition has only one entry:
In the second case, there is no function declaration with the name of $89g but it is used.
Is this bug in SmartGWT 3.0 LGPL edition??
Or may be processing of several responses in XML is not supported for RestDataSource in LGPL edition?
ListGrid with RestDataSource
Code:
ListGrid grid= new ListGrid(); grid.setUseAllDataSourceFields(true); grid.setAutoSaveEdits(false); grid.setDataFetchMode(FetchMode.PAGED); grid.setCanEdit(true); grid.setDataSource(CommonDataSource.getInstance("test"));
Uncaught JavaScript exception [this.$89g is not a function] in http://127.0.0.1:8888/tmorder/sc/mod...DataBinding.js, line 1250
17:50:48.617 [ERROR] [tmorder] 17:50:48.643:XRP3:WARN:Log:TypeError: this.$89g is not a function
RPCManager._performTransactionReply(2) @ tmorder/sc/modules/ISC_DataBinding.js:1250
[c]RPCManager.performTransactionReply(_1=>2, _2=>"<response><status>0</status><data><reco..."[ 407], _3=>undef) @ tmorder/sc/modules/ISC_DataBinding.js:1228
anonymous(2, [object XMLHttpRequest]) @ tmorder/sc/modules/ISC_Core.js:38
[c]Class.fireCallback(_1=>"isc.RPCManager.performTransactionReply(..."[ 67], _2=>"transactionNum,results,wd", _3=>[object Array]) @ tmorder/sc/modules/ISC_Core.js:301
[c]Comm.performXmlTransactionReply(_1=>2, _2=>[object XMLHttpRequest]) @ tmorder/sc/modules/ISC_Core.js:1268
anonymous([object XMLHttpRequest]) @ tmorder/sc/modules/ISC_Core.js:38
[c]Class.fireCallback(_1=>"isc.Comm.performXmlTransactionReply(2, ..."[ 56], _2=>"xmlHttpRequest", _3=>[object Array], _4=>[object Proxy], _5=>true) @ tmorder/sc/modules/ISC_Core.js:301
Comm._fireXMLCallback([object XMLHttpRequest], "isc.Comm.performXmlTransactionReply(2, ..."[ 56]) @ tmorder/sc/modules/ISC_Core.js:1244
unnamed([object Event]) @ tmorder/sc/modules/ISC_Core.js:1256
unnamed() @
Request postMessage:
Code:
<transaction transactionNum="2"> <operations> <request> <data> <TEST_ID>40</TEST_ID> <INT_VAL>331</INT_VAL> </data> <oldValues> <CHAR_VAL></CHAR_VAL> <DATE_VAL>2012-01-17T00:00:00</DATE_VAL> <NUM_VAL></NUM_VAL> <TEST_ID>40</TEST_ID> <INT_VAL>33</INT_VAL> </oldValues> <dataSource>test</dataSource> <operationType>update</operationType> <componentId>isc_ListGrid_0</componentId> </request> <request> <data> <TEST_ID>42</TEST_ID> <INT_VAL>41</INT_VAL> </data> <oldValues> <CHAR_VAL></CHAR_VAL> <DATE_VAL>2012-01-19T00:00:00</DATE_VAL> <NUM_VAL></NUM_VAL> <TEST_ID>42</TEST_ID> <INT_VAL>4</INT_VAL> </oldValues> <dataSource>test</dataSource> <operationType>update</operationType> <componentId>isc_ListGrid_0</componentId> </request> </operations> </transaction>
Code:
<responses> <response> <status>0</status> <data> <record> <CHAR_VAL></CHAR_VAL> <DATE_VAL>2012-01-17T00:00:00</DATE_VAL> <NUM_VAL></NUM_VAL> <TEST_ID>40</TEST_ID> <INT_VAL>331</INT_VAL> </record> </data> <errors /> </response> <response> <status>0</status> <data> <record> <CHAR_VAL></CHAR_VAL> <DATE_VAL>2012-01-19T00:00:00</DATE_VAL> <NUM_VAL></NUM_VAL> <TEST_ID>42</TEST_ID> <INT_VAL>41</INT_VAL> </record> </data> <errors /> </response> </responses>
Then I try to use SmartGWT 3.0 EE Evaluation , and the error also does not occur. The difference between two edition is in generated file \com\smartclient\public\sc\modules\ISC_DataBinding.js.
Enterprise edititon has the following entries in this file with function name $89g:
Code:
line 1295: ,isc.A.$89g=function isc_c_RPCManager__getXMLResponses(_1)... line 1300: return}else{_2.results=this.$89g(_2.results);_3=_2.results!=null}}}}
Code:
line 1250: return}else{_2.results=this.$89g(_2.results);_3=_2.results!=null}}}}
Is this bug in SmartGWT 3.0 LGPL edition??
Or may be processing of several responses in XML is not supported for RestDataSource in LGPL edition?
Comment