Go Back   SmartClient Forums > Smart GWT Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 3rd Oct 2010, 05:54
nabla52 nabla52 is offline
Registered Developer
 
Join Date: Jul 2009
Posts: 7
Default SummaryRowDataSource: javascript error

SmartGWT: 2.2
GWT: 2.0.4
Browser: Firefox 3.6.10
OS: Kubuntu 10.04

I'm trying to get summary information in a listgrid from the server using ListGrid.setSummaryRowDataSource(). Of importance, the listgrid.setShowCheckbox is True and one of the listgridfield is called "name" (I want to display the total number of records even if the dataset is not fully loaded). However when I return the following data from the server:

<data>
<record>
<name>4 records</name>
</record>
<startRow>0</startRow>
<endRow>0</endRow>
<totalRows>1</totalRows>
</data>

I get a javascript error as follows:

(TypeError): _2 is undefined
fileName: http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_Grids.js
lineNumber: 1255
stack: isc_ListGrid_getValueIconHTML("[SKINIMG]/DynamicForm/unchecked.png",(void 0))@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_Grids.js:1255
isc_ListGrid__dataArrived(0,0)@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_Grids.js:1045
anonymous(0,0)@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_Core.js:44
isc_ResultSet__doneDataArriving(0,0)@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_DataBinding.js:1291
isc_ResultSet_fetchRemoteDataReply([object Object],[object Array],[object Object])@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_DataBinding.js:1240
isc_c_Class_fireCallback([object Object],"dsResponse,data,dsRequest",[object Array],[object Object],(void 0))@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_Core.js:282
isc_Class_fireCallback([object Object],"dsResponse,data,dsRequest",[object Array])@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_Core.js:376
isc_DataSource__completeResponseProcessing([object Array],[object Object],[object Object])@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_DataBinding.js:527
isc_DataSource_processResponse("isc_UserListSummar yModel_0$6270",[object Object])@http://127.0.0.1:8888/rhl_hotel/sc/modules/ISC_DataBinding.js:379
("isc_UserListSummaryModel_0$6270",[object GWTJavaObject])@http://127.0.0.1:8888:288
@:0
([object GWTJavaObject],22675457,[object XMLHttpRequest])@http://127.0.0.1:8888/rhl_hotel/hosted.html?rhl_hotel:56
([object Event])@http://127.0.0.1:8888:44
((function () {__gwt_makeJavaInvoke(1)(handler, 22675457, _this);}),[object XMLHttpRequest],[object Object])@http://127.0.0.1:8888:17
@:0
(null,65563,(function () {__gwt_makeJavaInvoke(1)(handler, 22675457, _this);}),[object XMLHttpRequest],[object Object])@http://127.0.0.1:8888/rhl_hotel/hosted.html?rhl_hotel:56
([object Event])@http://127.0.0.1:8888:63

at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeO bject(ModuleSpace.java:264)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.ja va)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.j ava:188)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMes sages(BrowserChannel.java:1669)
at com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:636)

****

I can see that a "(void)0)" is passed to function isc_ListGrid_getValueIconHTML! Having variable _2 = 0 is the problem. However why the summary record need to show the checkbox in the first place?

Many thanks for your help

Edit: I've changed listgrid.setShowCheckbox to False and there are no javascript error. So there is definitively a problem with checkboxes.

Edit: In the summary datasource the "name" field is an Integer because I want to return the total number of records whereas the "name" field in the actual datasource for the listgrid is a Text. However I get a warning error on the validation for "name" in the actual data returned for the list as if the list is using the summary datasource to validate the actual data returned from the server! Does not make sense.

Last edited by nabla52; 3rd Oct 2010 at 06:50.. Reason: new test without checkbox + datasource validation warning
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


© 2010,2011 Isomorphic Software. All Rights Reserved