Background:
I'm using a pair of ListGrids to serve as a master/details inspector for a large amount of data. The structure of both grids is completely dynamic. The data for both comes from some legacy GWT-RPC code.
The master grid does not use any DataSource. I simply populate it via a call to "setData(ListGridRecord[])". [This grid, by the way, is using the new multi-level spanning headers -- they're working out great, thanks].
The details grid is backed by a custom DataSource, again with a completely dynamic structure. I want to use the DS in this case because I want to make use of AdvancedCriteria for filtering, and grouping and automatic-summary behaviors on the grid.
The master grid has an addCellClickHandler. In that handler, I determine what "key" is being inspected, and then generate an AdvancedCriteria with the information and call 'filterData(AdvancedCriteria,DSCallback) on the details ListGrid.
Problems:
1. After my data model has generated (GWT-RPC) and when I set the DataSource on the details grid, I get the following stack trace:
2. When I try to call 'filterData' on the details grid, I get this:
Grid settings are:
DataSource settings are:
So far I've:
1. Searched all around the docs for 'addGlobalID', "collides with ID of existing object" and found little to go on.
2. Ensured that I've called 'setID()' in the constructor of my DataSource.
2. Experimented with 'setAddGlobalID' in my DataSource's constructor
3. Experimented with 'window.isc_useSimpleNames = false' in my html file
4. Rebuilt my entire project, cleared its caches, restarted my browser, etc..
The fields of the details ListGrid will render based on the DataSourceFields that have been dynamically generated within my DataSource. However, no rows are shown ("No items to show.")
I don't have any .ds.xml file for this DataSource because its content is completely dynamic and generated on the fly. I also don't understand why IDACall is being called because I've called 'setClientOnly(true)' in the constructor of the DataSource.
Any clues here?
(using SmartGWT Pro 3.1d June 12th build with Firefox 11)
I'm using a pair of ListGrids to serve as a master/details inspector for a large amount of data. The structure of both grids is completely dynamic. The data for both comes from some legacy GWT-RPC code.
The master grid does not use any DataSource. I simply populate it via a call to "setData(ListGridRecord[])". [This grid, by the way, is using the new multi-level spanning headers -- they're working out great, thanks].
The details grid is backed by a custom DataSource, again with a completely dynamic structure. I want to use the DS in this case because I want to make use of AdvancedCriteria for filtering, and grouping and automatic-summary behaviors on the grid.
The master grid has an addCellClickHandler. In that handler, I determine what "key" is being inspected, and then generate an AdvancedCriteria with the information and call 'filterData(AdvancedCriteria,DSCallback) on the details ListGrid.
Problems:
1. After my data model has generated (GWT-RPC) and when I set the DataSource on the details grid, I get the following stack trace:
Code:
ERROR: 15:08:19.009:click8:WARN:Log:ClassFactory.addGlobalID: ID:'dsByNode' for object '[DataSource ID:dsByNode]' collides with ID of existing object '[DataSource ID:dsByNode]'. The global reference to this object will be replaced. com.smartgwt.client.core.JsObject$SGWT_WARN: 15:08:19.009:click8:WARN:Log:ClassFactory.addGlobalID: ID:'dsByNode' for object '[DataSource ID:dsByNode]' collides with ID of existing object '[DataSource ID:dsByNode]'. The global reference to this object will be replaced at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 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:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.data.DataSource.create(DataSource.java) at com.smartgwt.client.core.BaseClass.getOrCreateJsObj(BaseClass.java:112) at com.smartgwt.client.widgets.grid.ListGrid.setDataSource(ListGrid.java:15889) at com.myco.myapp.client.panels.TestPanel.configureGridByNode(TestPanel.java:522)
Code:
=== 2012-06-18 14:16:24,488 [l0-2] INFO IDACall - Performing 1 operation(s) === 2012-06-18 14:16:24,497 [l0-2] WARN RequestContext - dsRequest.execute() failed: java.lang.Exception: Can't find dataSource: isc_MyCustomDS_0 - please make sure that you have a isc_MyCustomDS_0.ds.xml file for it in [webRoot]/shared/ds at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:672) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) at com.isomorphic.application.AppBase.execute(AppBase.java:491) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1973) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199) at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Code:
grid.setHeaderHeight(40); grid.setCanEdit(false); grid.setShowAllRecords(true); grid.setKeepInParentRect(true); grid.setCanRemoveRecords(false); grid.setLeaveScrollbarGap(false); grid.setUseAllDataSourceFields(true); grid.setAutoFetchData(false); grid.setShowGridSummary(true); grid.setShowGroupSummary(true); grid.setShowGroupSummaryInHeader(true); grid.setGroupStartOpen(GroupStartOpen.ALL); grid.setGroupByField("groupID");
Code:
public class MyCustomDS extends DataSource{...} public MyCustomDS() { setID("dataByNode"); setClientOnly(true); setAddGlobalId(true); // or 'false'... makes no difference }
So far I've:
1. Searched all around the docs for 'addGlobalID', "collides with ID of existing object" and found little to go on.
2. Ensured that I've called 'setID()' in the constructor of my DataSource.
2. Experimented with 'setAddGlobalID' in my DataSource's constructor
3. Experimented with 'window.isc_useSimpleNames = false' in my html file
4. Rebuilt my entire project, cleared its caches, restarted my browser, etc..
The fields of the details ListGrid will render based on the DataSourceFields that have been dynamically generated within my DataSource. However, no rows are shown ("No items to show.")
I don't have any .ds.xml file for this DataSource because its content is completely dynamic and generated on the fly. I also don't understand why IDACall is being called because I've called 'setClientOnly(true)' in the constructor of the DataSource.
Any clues here?
(using SmartGWT Pro 3.1d June 12th build with Firefox 11)
Comment