Hi Support Team,
I found a probable bug in Smart GWT 3.1 LGPL edition. My SmartClient version is v8.3p_2012-11-27/LGPL Development Only (built 2012-11-27). I tested it by using Firefox 16.0.2. My Firefox's GWT plugin version is 1.0.11336. I use Windows 7 x64.
The bug is that listgrid's groupBy functionality fails if there are too many records inside the listgrid. The failure is silent, means that there is no error warning (neither in browser nor in Eclipse). The list grid is successfully populated with data, though.
Here is the code
FYI, there is nothing suspicious in the server and client side logs, though. But, anyway, here they are:
Server side:
Client side:
I found a probable bug in Smart GWT 3.1 LGPL edition. My SmartClient version is v8.3p_2012-11-27/LGPL Development Only (built 2012-11-27). I tested it by using Firefox 16.0.2. My Firefox's GWT plugin version is 1.0.11336. I use Windows 7 x64.
The bug is that listgrid's groupBy functionality fails if there are too many records inside the listgrid. The failure is silent, means that there is no error warning (neither in browser nor in Eclipse). The list grid is successfully populated with data, though.
Here is the code
Code:
package com.rapidesuite.example.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Random; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.data.DataSourceField; import com.smartgwt.client.data.Record; import com.smartgwt.client.types.FieldType; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; public class TestSmartGwt implements EntryPoint { //[b]CHANGE THE VALUE OF THIS VARIABLE (TRY 100 AND 1000). 100 should be okay, but 1000 should cause problem[/b] private final int NUMBER_OF_RECORDS = 1000; public void onModuleLoad() { SC.showConsole(); //long string array, to be used for grouping final String longStringsArray[] = { "ijwefehfuisadosauihnfijasd78asuhdiuashgduyashdnfiuahuhnsdaiuaSHduasN", "bdjknqowiduwefjaweuidsdakjbywetdfygwehbytwefdy3r6rtgsduhbfgsdhvjhbdsajbj", "nwsdcijksmakidfuhwe76rtgewiuajdnuygwehjknuygweiujqwehnuywebfjkwewun", "oidwejhdimniwuqehdiowemnjduiwehrdiojmwenudfyhwnkdjhqw378edhn3h8u", "ierhfiwekmiowejhfdoiwemdioewuhduiom23iuejoiwemeoifuyhwq", "uioewajdowekdewiojdkoiwejfoiewimfiewufdnmheiwrjfnuy23geu32y4rfbuyefuwejhnfuj", "jkdnfk34urhjwdiscolajs8dciodijwqiuedfnowieifjierufjoiewrfj9wierfjiweufdkmfnuwaidnfiujhnwei", "iusdjfowj8iewanmeiodfuhsanicjmoeidjwoiaeiaudnoiwejd9owq3i4krt34miuervjnoiergm9ie", "GHUHN*Uhbaiuwdsnuwqexciuwehdcoiwefjcedfmcvoivm,er98e7rfnlknasdUyhjewfnanm", "98237rdj cmisaudhjoiOIJMIKUGH^&TYVbesalfijwae9uifsdlMSADoifvhjm", "uiowefjiosdkl,mwoadjwqiohwqeuidmsaoidqwendoEHUYEIFNMOIWERYFHWAEIUNFI", "IUWEHNFDIOWKEIHDQWUNOIASDHIUQWMDOIWEFHJOWEALDJKIWUEHUI43GHIUyugiuewghroiwehrwqeuinik", "erhnfiweqomrfowidcuhuimawosidyhqweiodmkweiucnskldjfwienmdfowiesahdioweudfhiuernfgoasuidhin", "oiuwejnmdfklsamasihdgniqwlk3ejh2q38w7dghbcdszklmcis8hwdpoqfj9igm ujednQUIFGBWEIFUSB", "OUI3NREMKL23MDC98SYHOIjmnuibnoijhwefkwe9ifuhaoifughweriuuehfdiuweafgbhfwei9uhnj" }; //greeting array, to be also used for grouping final String greetingsArray[] = {"Good Morning", "Good Afternoon", "Good Evening", "Good Night", "Good Lord ..."}; //constants for column identification final String ID = "id"; final String LONG_STRING = "longString"; final String HELLO = "hello"; final String GREETING = "greeting"; //smartgwt plumbing, never mind about this DataSource ds = new DataSource(); ds.setClientOnly(true); DataSourceField idField = new DataSourceField(ID, FieldType.INTEGER); idField.setPrimaryKey(true); ds.addField(idField); ds.addField(new DataSourceField(LONG_STRING, FieldType.TEXT)); ds.addField(new DataSourceField(HELLO, FieldType.TEXT)); ds.addField(new DataSourceField(GREETING, FieldType.TEXT)); //populating data into data source for (int i = 0 ; i < NUMBER_OF_RECORDS ; i++) { Record record = new Record(); record.setAttribute(ID, new Integer(i)); for (int j = longStringsArray.length ; j > 0 ; j--) { if ((i+1)%j == 0) { record.setAttribute(LONG_STRING, longStringsArray[j-1]); break; } } int rand = Random.nextInt(greetingsArray.length); String greeting = greetingsArray[rand]; record.setAttribute(HELLO, "Hello World "+i+", "+greeting); record.setAttribute(GREETING, greeting); ds.addData(record); } //another smartgwt plumbing ListGrid listGrid = new ListGrid(ds); listGrid.setFields(new ListGridField(ID, "ID"), new ListGridField(LONG_STRING, "Long String"), new ListGridField(HELLO, "Hello"), new ListGridField(GREETING, "Greeting") ); listGrid.setWidth100(); listGrid.setHeight100(); listGrid.fetchData(); //here is the (probably) FAILING groupBy listGrid.groupBy(LONG_STRING, GREETING); //just hide fields which are (supposed to be) displayed in the grouping listGrid.hideFields(LONG_STRING, GREETING); //another smartgwt plumbing listGrid.draw(); listGrid.show(); } }
Server side:
Code:
Initializing App Engine server Nov 29, 2012 7:33:41 AM com.google.apphosting.utils.jetty.JettyLogger info INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Nov 29, 2012 7:33:41 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed C:\Users\User\workspace\TestSmartGwt\war\WEB-INF/appengine-web.xml Nov 29, 2012 7:33:41 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml INFO: Successfully processed C:\Users\User\workspace\TestSmartGwt\war\WEB-INF/web.xml Nov 29, 2012 3:33:42 PM com.google.appengine.tools.development.DevAppServerImpl start INFO: The server is running at http://localhost:8888/ Nov 29, 2012 3:33:42 PM com.google.appengine.tools.development.DevAppServerImpl start INFO: The admin console is running at http://localhost:8888/_ah/admin Nov 29, 2012 3:34:12 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /testsmartgwt/sc/IDACall
Code:
15:33:48.828:INFO:Log:initialized 15:33:49.882:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value 'function DataView() { [native code] }'. Existing object will be replaced. This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information. 15:34:01.322:INFO:Log:isc.Page is loaded
Comment