Hi, after I resolved the problem with the right path of analytics .js file, now I have a new question for you.
Even if I followed the showcase example, applying it on myProject case, CubeGrid doesn't show and the code returns me a large exception.
This is my code
In Datasource ds I have correctly built the query to exctract data. The rest of the code is the same of the showcase, except for the starting constructor
the following is the thrown exception
I supposed it could be the same case of this post
http://forums.smartclient.com/showth...light=cubegrid
so I have rebuilt the project and cleaned the cash of my browser, but the thrown exception is the same, and I'm sure that the version of analytics.jar and the smartgwt .jars too are the same (v. 2.4).
Could you help me to fix also this problem?
Even if I followed the showcase example, applying it on myProject case, CubeGrid doesn't show and the code returns me a large exception.
This is my code
Code:
public Business(final TabSet mainTabSet, String panelID) { super(mainTabSet); this.setID(panelID); this.onModuleLoad(); } public void onModuleLoad() { cubeGrid = new CubeGrid() { @Override protected Canvas getExpansionComponent(ListGridRecord record) { Canvas canvas = super.getExpansionComponent(record); canvas.setMargin(5); return canvas; } }; //in order to enable charting, the Drawing module must be present if(SC.hasDrawing()) { cubeGrid.setEnableCharting(true); } DataSource ds = DataSource.get("ds"); cubeGrid.setDataSource(ds); cubeGrid.setFetchOperation("cubeGrid"); cubeGrid.setWidth100(); cubeGrid.setHeight100(); cubeGrid.setHideEmptyFacetValues(true); cubeGrid.setShowCellContextMenus(true); final NumberFormat numberFormat = NumberFormat.getFormat("0,000"); cubeGrid.setCellFormatter(new CellFormatter() { public String format(Object value, ListGridRecord record, int rowNum, int colNum) { if (value == null) return null; try { return numberFormat.format(((Number) value).longValue()); } catch (Exception e) { return value.toString(); } } }); cubeGrid.setColumnFacets("COL1", "COL2", "COL3"); cubeGrid.setRowFacets("COL4", "COL5"); this.vLayout.addMember(cubeGrid); }
the following is the thrown exception
Code:
16:33:34.977 [ERROR] [myProject] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses at com.google.gwt.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:214) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:103) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:101) at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) 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.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:736) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): _1 is undefined fileName: http://127.0.0.1:8888/myProject/sc/modules/ISC_Analytics.js lineNumber: 132 stack: isc_CubeGrid_setFacets()@http://127.0.0.1:8888/myProject/sc/modules/ISC_Analytics.js:132 isc_CubeGrid_initWidget([object Object],(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Analytics.js:54 isc_Canvas_init([object Object],(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:2021 isc_Class_completeCreation([object Object],(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:364 isc_c_Class_create([object Object])@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:234 ()@http://127.0.0.1:8888:465 @:0 ([object GWTJavaObject],1179847,[object GWTJavaObject])@http://127.0.0.1:8888/myProject/hosted.html?myProject:56 ([object Object],[object Object],12)@http://127.0.0.1:8888:508 ((function () {var param = {viewer: arguments[0], leaf: arguments[1], recordNum: arguments[2]};var event = __gwt_makeJavaInvoke(1)(null, 17825903, param);__gwt_makeJavaInvoke(1)(selfJ, 1179847, event);}),[object Object],[object Object])@http://127.0.0.1:8888:12 @:0 (null,65634,(function () {var param = {viewer: arguments[0], leaf: arguments[1], recordNum: arguments[2]};var event = __gwt_makeJavaInvoke(1)(null, 17825903, param);__gwt_makeJavaInvoke(1)(selfJ, 1179847, event);}),[object Object],[object Object])@http://127.0.0.1:8888/myProject/hosted.html?myProject:56 ([object Object],[object Object],12)@http://127.0.0.1:8888:58 isc_TreeGrid_rowClick([object Object],12,0)@http://127.0.0.1:8888/myProject/sc/modules/ISC_Grids.js:3016 anonymous([object Object],12,0)@http://127.0.0.1:8888/myProject/sc/modules/ISC_Grids.js:993 isc_GridRenderer__rowClick(12,0)@http://127.0.0.1:8888/myProject/sc/modules/ISC_Grids.js:795 isc_GridRenderer_click([object Object],(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Grids.js:792 isc_c_Class_invokeSuper(null,"click")@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:305 isc_c_Class_Super("click",[object Object])@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:297 isc_TreeGridBody_click([object Object],(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Grids.js:2957 isc_Canvas_handleClick([object Object],(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:3151 isc_c_EventHandler_bubbleEvent([object Object],"click")@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:1610 isc_c_EventHandler_handleClick([object Object])@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:1458 isc_c_EventHandler__handleMouseUp([object MouseEvent],(void 0))@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:1445 isc_c_EventHandler_handleMouseUp([object MouseEvent])@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:1436 isc_c_EventHandler_dispatch(isc_c_EventHandler_handleMouseUp,[object MouseEvent])@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:1673 anonymous([object MouseEvent])@http://127.0.0.1:8888/myProject/sc/modules/ISC_Core.js:61 at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) 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.widgets.cube.CubeGrid.create(CubeGrid.java) at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:361) at com.smartgwt.client.widgets.layout.Layout.addMember(Layout.java:1131) at it.ccg.myProject.client.nelli.Business.onModuleLoad(Business.java:102) at it.ccg.myProject.client.nelli.Business.<init>(Business.java:57) at it.ccg.myProject.client.nelli.Business$Factory.create(Business.java:135) at it.ccg.myProject.client.Main.showSample(Main.java:219) at it.ccg.myProject.client.Main.access$0(Main.java:203) at it.ccg.myProject.client.Main$2.onLeafClick(Main.java:83) at com.smartgwt.client.widgets.tree.events.LeafClickEvent.dispatch(LeafClickEvent.java:98) at com.smartgwt.client.widgets.tree.events.LeafClickEvent.dispatch(LeafClickEvent.java:1) at com.google.gwt.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:204) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:103) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:101) at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) 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.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:736)
http://forums.smartclient.com/showth...light=cubegrid
so I have rebuilt the project and cleaned the cash of my browser, but the thrown exception is the same, and I'm sure that the version of analytics.jar and the smartgwt .jars too are the same (v. 2.4).
Could you help me to fix also this problem?
Comment