Hi,
I'd like to pring my ListGrid. My listgrid has a selectionApperance set to CHECKBOX.
I'd like to hide this checkboxes for printing and print only data.
Obviously, I don't want to create a new grid and load tha data again.
I imagine a methos setPrintSelectionApperance () or something simmilar.
Is there a way how to do it?
I even tried to change selection apperance on the fly but end up with an exception and inconsistent look of the grid.
I use the smartGWT 2.5 downloaded on Apr 7th, firefox 3.6
I'd like to pring my ListGrid. My listgrid has a selectionApperance set to CHECKBOX.
I'd like to hide this checkboxes for printing and print only data.
Obviously, I don't want to create a new grid and load tha data again.
I imagine a methos setPrintSelectionApperance () or something simmilar.
Is there a way how to do it?
I even tried to change selection apperance on the fly but end up with an exception and inconsistent look of the grid.
Code:
userGrid.deselectAllRecords();
userGrid.setSelectionAppearance(SelectionAppearance.ROW_STYLE);
Canvas.printComponents(new Object[]{printHeader, userGrid});
Code:
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:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:129)
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.GeneratedMethodAccessor646.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:662)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): _1 is null
fileName: http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js
lineNumber: 1112
stack: isc_ListGrid__canSort(null)@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:1112
()@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:979
isc_Canvas_getTagStart(true)@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:2201
isc_Canvas__insertHTML(true)@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:2108
isc_Canvas_draw((void 0),(void 0),(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:2039
isc_StatefulCanvas_draw()@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Foundation.js:288
isc_Layout_layoutChildren("initial draw")@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Foundation.js:464
isc_Layout_drawChildren()@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Foundation.js:363
isc_Canvas_draw((void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:2039
isc_c_Class_invokeSuper([object Object],"draw",(void 0),(void 0),(void 0),(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:305
isc_Toolbar_draw()@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Foundation.js:767
isc_c_Class_invokeSuper(null,"draw")@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:305
isc_c_Class_Super("draw",[object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:297
()@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:2576
isc_ListGrid__updateFieldWidths("set fields",(void 0),(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:1367
isc_ListGrid_layoutChildren("set fields")@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:1363
isc_ListGrid_setFields([object Array])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:1274
isc_ListGrid_setSelectionAppearance("rowStyle")@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Grids.js:1121
isc_Class_setProperties([object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:388
isc_Class_setProperty("selectionAppearance","rowStyle")@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:386
("selectionAppearance","rowStyle")@http://127.0.0.1:8888:151
@:0
([object GWTJavaObject],1179847,[object GWTJavaObject])@http://127.0.0.1:8888/helloworld/hosted.html?helloworld:56
([object Object],(void 0))@http://127.0.0.1:8888:222
((function () {var param = {};var event = __gwt_makeJavaInvoke(1)(null, 1638519, param);__gwt_makeJavaInvoke(1)(selfJ, 1179847, event);var ret = __gwt_makeJavaInvoke(0)(event, 1441794);return !ret;}),[object Object],[object Object])@http://127.0.0.1:8888:71
@:0
(null,94,(function () {var param = {};var event = __gwt_makeJavaInvoke(1)(null, 1638519, param);__gwt_makeJavaInvoke(1)(selfJ, 1179847, event);var ret = __gwt_makeJavaInvoke(0)(event, 1441794);return !ret;}),[object Object],[object Object])@http://127.0.0.1:8888/helloworld/hosted.html?helloworld:56
([object Object],(void 0))@http://127.0.0.1:8888:38
([object Object],(void 0))@http://127.0.0.1:8888:13
isc_StatefulCanvas_handleActivate([object Object],(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Foundation.js:321
isc_StatefulCanvas_handleClick([object Object],(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Foundation.js:323
isc_c_EventHandler_bubbleEvent([object Object],"click")@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:1573
isc_c_EventHandler_handleClick([object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:1421
isc_c_EventHandler__handleMouseUp([object MouseEvent],(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:1408
isc_c_EventHandler_handleMouseUp([object MouseEvent])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:1399
isc_c_EventHandler_dispatch(isc_c_EventHandler_handleMouseUp,[object MouseEvent])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:1636
anonymous([object MouseEvent])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Core.js:63
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.widgets.BaseWidget.setProperty(BaseWidget.java)
at com.smartgwt.client.widgets.BaseWidget.setAttribute(BaseWidget.java:586)
at com.smartgwt.client.widgets.grid.ListGrid.setSelectionAppearance(ListGrid.java:5413)
at cz.bcom.client.tabs.UserManagementTab$5.onClick(UserManagementTab.java:141)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:99)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:204)
... 28 more
Comment