Hi,
I'm trying to use SmartGWT's inbuilt printing support to print objects spanned on multiple tabs in TabSet. My first tab contains a DynamicForm for editing the item's details and in addition of this I have a few tabs with ListGrid's containing data related to the item. I have a print button to print all details of the item which is implemented with Canvas.printComponents(Object[]).
It seems that the printing fails because the hidden tabs have not yet been drawn or refreshed when calling Canvas.printComponents. If I manually go through the tabs (and they get drawn) and afterwards click print it works ok. I've tried a few workarounds in line of
This actually kind of works but what gets printed out with grids is wrong. It seems to print the actual outlook of the widgets instead of the print html which I'm expecting. Is there a way to "initialize" the tab grid widgets before calling printComponents so that they work as expected in the print out ?
Thanks!
Marko
I'm trying to use SmartGWT's inbuilt printing support to print objects spanned on multiple tabs in TabSet. My first tab contains a DynamicForm for editing the item's details and in addition of this I have a few tabs with ListGrid's containing data related to the item. I have a print button to print all details of the item which is implemented with Canvas.printComponents(Object[]).
It seems that the printing fails because the hidden tabs have not yet been drawn or refreshed when calling Canvas.printComponents. If I manually go through the tabs (and they get drawn) and afterwards click print it works ok. I've tried a few workarounds in line of
Code:
if(!tab2Grid.isDrawn()) tab2Grid.draw(); if(!tab3Grid.isDrawn()) tab3Grid.draw(); Canvas.printComponents(...); ...
Thanks!
Marko
Comment